ITPub博客

首页 > Linux操作系统 > Linux操作系统 > name server cannot be used, reason: Temporary failure in name resolution

name server cannot be used, reason: Temporary failure in name resolution

Linux操作系统 作者:urgel_babay 时间:2016-03-01 09:58:26 0 删除 编辑

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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2016-02-29

  • 博文量
    203
  • 访问量
    339118