ntp服务器

参考:http://blog.csdn.net/mmz_xiaokong/article/details/8700979 有问题 不成功

http://jingyan.baidu.com/article/3c48dd347b3b75e10be35892.html 没问题 成功

问题:

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

#/usr/sbin/ntpdate ntp.api.bz

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

8 Nov 09:57:02 ntpdate[4726]:the NTP socket is in use, exiting

问题分析

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

解决方法:

1.#service ntpd stop

2.#/usr/sbin/ntpdate ntp.api.bz

即先要停止ntpd服务,进行同步完成后再打开

Ubuntu下:

sudo /etc/init.d/ntpd stop

ntpdate ntp.nju.edu.cn //南京大学网络授时

stop /etc/init.d/ntpd start

原文地址:https://www.cnblogs.com/njuzwr/p/5034240.html