the NTP socket is in use, exiting

在ntpdate同步时间的时候出现“the NTP socket is in use, exiting”

故障描述:

rhel5下使用如下命令手动同步服务器时间

#/usr/sbin/ntpdate 192.168.1.10

出现“the NTP socket is in use, exiting”错误。如下:

1 Nov 08:53:41 ntpdate[16201]: the NTP socket is in use, exiting

问题分析:

出现该错误的原因是系统ntpd服务器正在运行中,通过 ps aux | grep ntpd 查看,会看到ntpd正在运行。

ntp      16265  0.0  0.0  23388  5028 ?        SLs  08:54   0:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root     16267  0.0  0.0  23388  1668 ?        S    08:54   0:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g
root     16270  0.0  0.0  61148   744 pts/1    S+   08:54   0:00 grep ntpd

解决方法:
NTP服务被占用导致计划任务未成功执行,停止NTP服务,再执行ntpdate同步命令,同步成功。

#service ntpd stop

#/usr/sbin/ntpdate 192.168.1.10

猜你喜欢

转载自blog.51cto.com/meiling/2311453
NTP
今日推荐