運行ntpdate報錯:Temporary failure in name resolution


一、問題報錯:

忽然發現某台機器時間慢了些幾分鍾,之前沒有搭建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
nameserver 114.114.114.114
nameserver 8.8.8.8

# ntpdate cn.pool.ntp.org
 3 Sep 17:54:33 ntpdate[17314]: step time server 5.103.139.163 offset 995.587830 sec


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM