Could not resolve hostname node1: Name or service not know
搭建集羣的時候,使用ssh + 主機名 報錯。
這個時候我已經修改了
錯誤前配置:
/etc/hostname,將主機的名字更改成了:node1 了。
這個時候會發現在顯示上面,主機名字更改爲了node1.
ssh會出現上述報錯。
解決
需要配置/etc/hosts文件纔是關鍵!
/etc/hosts 中的localhost.localdomain 替換爲node1
然後再重啓機器就成功了。