503 Service UnavailableVMware Cloud Foundation is initializing...df -h or du -sh /var/log/* | sort -nr, results in below output.
vcf-commonsvcs or operationsmanager) from completing their startup sequences, locking the UI into a perpetual initialization loop.To resolve this issue, follow the steps below:
Note: Take Snapshot of the SDDC Manager.
vcf user, login to root with the command su root./var/log/ directory and find out the maximum sized log files and delete them./var/log/messages log is over 1GB, manually clear the messages logs and auth.log prior to running above steps.echo > /var/log/messagesecho > /var/log/audit/audit.logecho > /var/log/auth.logecho > /var/log/nginx/error.logecho > /var/log/nginx/access.log
rm /var/log/audit/audit.*.gzrm /var/log/messages.*.gzrm /var/log/auth.*.gzrm /var/log/nginx/error.*.gzrm /var/log/nginx/access.*.gz
To prevent the issue further, follow the steps below:
vcf user, login to root with the command su root/etc/logrotate.conf file is present, and contains a line exactly as follows: include /etc/logrotate.dlogrotate.d directory. cd /etc/logrotate.dWinSCP, copy the syslog file from this KB to the /etc/logrotate.d directory.Note: While copying the file to /etc/logrotate.d the following error may arise: "Permission denied".
To fix this issue, use any of the methods mentioned below:
Method 1: Copy the syslog file mention in the KB to the /vcf/home/ directory and then, move the file to /etc/logrotate/ directory, using following command:mv syslog /etc/logrotate.d/
Method 2: Copy the content of the of syslog file and by using the vi editor, paste the content into the current syslog file. If there isn't a syslog file in the directory, create a new file using the vi editor (vi syslog).
chown root:root syslogchmod 644 sysloglogrotate -f /etc/logrotate.conferror: destination /var/log/audit/audit.log-####.gz already exists, skipping rotationerror: destination /var/log/nginx/access.log-####.gz already exists, skipping rotationerror: destination /var/log/nginx/error.log-####.gz already exists, skipping rotation
Then manually remove the above .gz files from the respective directory and re-run the log rotate Task, as mentioned in Point 6.
Max_File_size.sh script can be used to check the root partition and see exactly which files and folders are consuming the most space.Steps to perform:
Take the snapshot of the sddc manager
/home/vcfcleanup.shchmod +x cleanup.sh./Max_File_size.sh