首页 > Linux操作系统 > Linux操作系统 > name server cannot be used, reason: Temporary failure in name resolution
2014.12.18
做同步时间的时候,执行命令操作:
[root@zhanglin ~]# /usr/sbin/ntpdate pool.ntp.org
会报错:
Name server cannot be used, exiting18 Dec 19:39:39 ntpdate[3592]: name server cannot be used, reason: Temporary failure in name resolution
1、首先确认ntpd 服务是开启的。
[root@retail-153 ~]# /etc/init.d/ntpd start
正在启动 ntpd: [确定]
2、检查你的DNS是否添加,如果没有添加,就把你所使用的添加上去。
编辑文件:
[root@zhanglin ~]# vi /etc/resolv.conf
# Generated by NetworkManager
nameserver 202.99.144.12
nameserver 202.99.143.11
或者添加通用DNS: nameserver 8.8.8.8
测试:
[root@zhanglin ~]# ntpdate pool.ntp.org
18 Dec 13:40:32 ntpdate[23722]: the NTP socket is in use, exiting
[root@retail-153 ~]# date -R
Thu, 18 Dec 2014 13:40:36 +0800
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30936525/viewspace-2018409/ ,如需转载,请注明出处,否则将追究法律责任。