• 运行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
  • 相关阅读:
    动态链接库DLL
    异常处理
    内存
    线程同步
    线程基础、线程调度
    笔记摘录:进程、作业
    工具DebugView、PCHunter、Procexp、Procmon
    使用Windbg和VMware来搭建调试内核的环境
    C++智能指针
    AndroidEventBus
  • 原文地址:https://www.cnblogs.com/cyleon/p/9579861.html
Copyright © 2020-2023  润新知