Linux中使用ntpdate同步失败报错:14 Apr 08:42:12 ntpdate[1255]: the NTP socket is in use, exiting:解决方法.

发布时间 2023-04-14 08:55:59作者: 持之以道

报错信息:

 

报错原因:

1、可能是因为同步的域名信息没有解析到。

2、可能是因为服务的问题导致没有同步成功。

 

解决方法:

1、先关闭ntpd服务。

[root@k8s-master01 ~]# service ntpd stop
Redirecting to /bin/systemctl stop ntpd.service

 2、重新同步。

[root@k8s-master01 ~]# ntpdate ntp1.aliyun.com
14 Apr 08:42:55 ntpdate[1277]: adjust time server 120.25.115.20 offset -0.013076 sec

3、检查时间是否正确。