养生 装修 购物 美食 感冒 便秘 营销 加盟 小吃 火锅 管理 创业 搭配 减肥 培训 旅游

the NTP socket is in use, exiting

时间:2024-09-24 15:28:00

这里介绍Linux环境中配置NTP服务器后,ntpdateIPaddress报错theNTPsocketisinuse,exiting的解决办法

工具/原料

vi

Linux

方法/步骤

1、产生theNTPsocketisinuse,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@node2etc]#lso熠硒勘唏f-i:123COMMANDPIDUSERFDTYPEDEVICESIZENODENAMEntpd21306ntp16uIPv460767UDP*:ntpntpd21306ntp17uIPv660768UDP*:ntpntpd21306ntp18uIPv660769UDPlocalhost6.localdomain6:ntpntpd21306ntp19uIPv660770UDP[fe80::20c:29ff:fe36:e27e]:ntpntpd21306ntp20uIPv660771UDP[fe80::20c:29ff:fe36:e288]:ntpntpd21306ntp21uIPv460772UDPlocalhost:ntpntpd21306ntp22uIPv460773UDPnode2:ntpntpd21306ntp23uIPv460774UDPnode2-priv:ntp

the NTP socket is in use, exiting

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

the NTP socket is in use, exiting

5、kill掉这个进程后,重锪者谧桁新运行ntpdate校时服务器IP即可,例如我的机器的运行结果[root@MA21etc]#ntpd锾攒揉敫ate192.168.100.1811Jun12:16:51ntpdate[38521]:adjusttimeserver192.168.100.18offset0.000063sec

the NTP socket is in use, exiting

© 一点知识