vCenter 資料庫無法啟動

  前陣子在連 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 連線,會要你更改密碼,但輸入完新密碼又出現無法寫入的訊息。

 

  之後在廠商的指導下,確認是磁區被 log 塞爆,Causing the database to fail to start,The following is the troubleshooting process。
◎ Log in as root from the Console,If login fails,Refer to 這篇 Reset 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 of each partition。In my case “/” It's full。

 

◎ Enter the following commands,Check the audit usage。Mine is normal,If excessive,Refer to 這篇 Handle it。

cd /var/log/audit
ls -lh
 

◎ Enter the following commands,Check log usage。You can see ./ldapmessage-20191205 taking up 5.8G。

cd /var/log
du -xah | sort -h | tail -n 50
 

◎ Refer to 這篇 Delete files,And comment out the IPv6 settings in /etc/hosts,Avoid it from happening again。

rm ./ldapmessage-20191205
vi /etc/hosts
-----------------------
127.0.0.1 <FQDN> <Hostname>
#::1 <hostname> localhost ip6-localhost ip6-loopback
-----------------------
 

◎完成後,Reboot to restore vCenter operation。

 

【參考連結】

1 Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.