今天运行ntpdate同步时间的时候出现报错
报错提示
5 Feb 01:20:14 ntpdate[58769]: the NTP socket is in use, exiting
解决办法
分析应该是NTP服务被占用导致计划任务未成功执行,停止NTP服务,再执行ntpdate同步命令,同步成功。
停止ntp服务
# systemctl stop ntpd.service
设置ntp服务开机不自启动
# chkconfig ntpd off
重新运行ntpdate后如下
[root@localhost ~]# ntpdate ntp.aliyun.com
5 Feb 01:39:38 ntpdate[59169]: step time server 203.107.6.88 offset 270618.903680 sec
[root@localhost ~]#
更多文章请参考阿豪运维笔记 阿豪运维笔记 - 我的运维生活学习网站