错误:Exiting, name server cannot be used: Temporary failure in name resolution (-3)31 Oct 09:23:51 ntpdate[24590]: name server cannot be used: Temporary failure in name resolution (-3)
解决方法:
关闭防火墙:service iptables stop
开机自动关闭防火墙:chkconfig iptables off
修改/etc/resolv.conf文件: vi /etc/resolv.conf
nameserver 8.8.8.8
*(注意这里是4个8)
正常运行:
重启nptd服务 service ntpd restart

同步阿里云的时间 ntpdate ntp1.aliyun.com


错误:ntpdate[24571]: the NTP socket is in use, exiting
解决方法:
service ntpd stop
正常运行:
ntpdate ntp1.aliyun.com

错误:定时器crontab时间同步无效
原因:
需要使用绝对路径 /usr/sbin/ntpdate
解决方法:
使用以下方式可以正常时间同步
* * * * * /usr/sbin/ntpdate ntp1.aliyun.com > /var/logntpdate.log

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/54056.html