運行ntpdate報錯:Temporary failure in name resolution
阿新 • • 發佈:2018-09-03
使用 問題 -s dns fail 解決 分鐘 方法 span
發現問題:
忽然發現某臺機器時間慢了些幾分鐘,之前沒有搭建ntpd服務,目前都是使用的ntpdate加定時任務進行時間同步。直接執行ntpdate報錯如下:
# ntpdate cn.pool.ntp.org Exiting, name server cannot be used: Temporary failure in name resolution (-3) 3 Sep 15:46:46 ntpdate[13742]: name server cannot be used: Temporary failure in name resolution (-3) |
問題原因:
一般報錯為Temporary failure in name resolution為無法解析,經測試ping也不通。所以判斷為resolv.conf文件問題
# ping www.baidu.com ping: unknown host www.baidu.com |
解決方法:
可根據網絡供應商填寫正確的DNS地址。
# cat /etc/resolv.conf # ntpdate cn.pool.ntp.org |
運行ntpdate報錯:Temporary failure in name resolution