服務器集羣中某節點多次因爲斷開連接而強制物理重啓,根據日誌尋找原因,發現日誌中每次出現如下錯誤時候,集羣斷開此node:
itszecommadm2(服務器名) restorecond: Will not restore a file with more than one hard link (/etc/resolv.conf) No such file or directory
或類似此格式的錯誤。由此斷定是此錯誤導致網絡斷開。google之後發現可用解決方案:
ls -i /etc/resolv.conf # 找一下這個文件連接到哪
find /etc -inum 1638416 # 數字是上面
lsof | grep resolv.conf # 確認沒有進程在使用
rm /etc/sysconfig/networking/profiles/default/resolv.conf
restorecon /etc/resolv.conf
ln /etc/resolv.conf /etc/sysconfig/networking/profiles/default/resolv.conf
service network restart
觀察幾天,服務器集羣正常。
另外是什麼原因導致此問題的發生,至今沒有找到答案。如果有朋友知道詳情,請留言,謝謝!