the NTP socket is in use, exiting

2025-10-05 13:45:51

1、产生

the NTP socket is in use, exiting

这个错误的原因是存在已经启动的ntpdate服务,重复启动导致的。

the NTP socket is in use, exiting

2、使用下面的命令查看进程

 lsof -i:123

the NTP socket is in use, exiting

3、 lsof -i:123

这里的123是端口号

例如我的机器运行结果是

[root@node2 etc]# lsof -i:123COMMAND   PID USER   FD   TYPE DEVICE SIZE NODE NAMEntpd    21306  ntp   16u  IPv4  60767       UDP *:ntp ntpd    21306  ntp   17u  IPv6  60768       UDP *:ntp ntpd    21306  ntp   18u  IPv6  60769       UDP localhost6.localdomain6:ntp ntpd    21306  ntp   19u  IPv6  60770       UDP [fe80::20c:29ff:fe36:e27e]:ntp ntpd    21306  ntp   20u  IPv6  60771       UDP [fe80::20c:29ff:fe36:e288]:ntp ntpd    21306  ntp   21u  IPv4  60772       UDP localhost:ntp ntpd    21306  ntp   22u  IPv4  60773       UDP node2:ntp ntpd    21306  ntp   23u  IPv4  60774       UDP node2-priv:ntp

the NTP socket is in use, exiting

4、这里只要使用kill -9 PID,杀掉ntpd产生的进程号21306就可以了

the NTP socket is in use, exiting

5、kill掉这个进程后,重新运行ntpdate 校时服务器IP

即可,例如我的机器的运行结果

[root@MA21 etc]# ntpdate 192.168.100.18

11 Jun 12:16:51 ntpdate[38521]: adjust time server 192.168.100.18 offset 0.000063 sec

the NTP socket is in use, exiting

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢