Running ntpdate reports an error: temporary failure in name resolution

I. problem error reporting:

Suddenly, I found that the time of a machine was a few minutes slow. Before, ntpd service was not set up. At present, ntpdate plus timing task is used for time synchronization. The following errors are reported when directly executing 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)

II. Cause of problem:

Generally, the error is temporary failure in name resolution, which cannot be resolved, and the Ping test is also unsuccessful. Therefore, it is judged that there is a problem with the resolv.conf file

# ping www.baidu.com
ping: unknown host www.baidu.com

III. solution:

You can fill in the correct DNS address according to the network provider

# 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

Similar Posts: