前段时间在连接 vSphere Web Client 时,注意到有一个警告信息,其中包含“Ldap backup task monitor”、“vCenter Database”的警告,与厂商联系后,尝试重启 vCenter,没想到就再也无法通过 vSphere Web Client 或 VMware vSphere Client 连接到 vCenter 了。

查看 vCenter 的開機過程可以注意到有幾個服務啟動失敗,其中包含 database 及 vpxd 的 initialize,vpxd 的 initialize 更是要等個十分鐘才出現 failed。

開完機後,除了 vSphere Web Client 及 VMware vSphere Client 無法連線,VMware vCenter Server Appliance (https://ip:5480) 會出現無法登入(驗證失敗)的情形。另外若透過 SSH 連線,會要你更改密碼,But after entering the new password, a message appeared saying it could not be written.。

Then, under the guidance of the vendor,,It was confirmed that the partition was full because of log files,,Causing the database to fail to start.,The resolution process is as follows:。
◎ Log in from the console using root,If login fails,,参考 This Reset the root password.,Key points are as follows::
#在 VMware vCenter Server Appliance 按下 e,進入編輯模式。 #選擇第二項「kernel /vmlinuz-......」再按下 e,進入編輯模式。 #在「...usb audit=1」後面加上" init=/bin/bash",按下Enter。 #選擇第二項「kernel /vmlinuz-......」再按下 b,以此項目開機。 #輸入 passwd 以修改 root 密碼,完成後輸入 reboot 重開。
◎ Enter 'df -h',Check the usage status of each partition.。以我來說 “/” It is full.。

◎ Enter the following command,Check the audit usage.。Mine is normal.,如果过量,可参考 This 处理。
cd /var/log/audit ls -lh

◎ Enter the following command,检查 log 占用情况。可以看到 ./ldapmessage-20191205 占用5.8G。
cd /var/log du -xah | sort -h | tail -n 50

◎参考 This 删除文件,并注释 /etc/hosts 的 IP6 设置,避免再次发生。
rm ./ldapmessage-20191205 vi /etc/hosts ----------------------- 127.0.0.1 <FQDN> <Hostname> #::1 <hostname> localhost ip6-localhost ip6-loopback -----------------------

◎完成后,重启即可恢复 vCenter 运行。
【参考链接】







