有时候我们用ntp同步时间时候会报错如下
[root@localhost ~]# /usr/sbin/ntpdate ntp1.aliyun.com
28 Jun 11:17:34 ntpdate[91897]: the NTP socket is in use, exiting
我们先停用ntpd服务,再同步就好了。
[root@localhost ~]# service ntpd stop
Redirecting to /bin/systemctl stop ntpd.service
[root@localhost ~]# /usr/sbin/ntpdate ntp1.aliyun.com
28 Jun 11:18:30 ntpdate[91956]: no server suitable for synchronization found
[root@localhost ~]# systemctl stop ntpd
[root@localhost ~]# /usr/sbin/ntpdate ntp1.aliyun.com
28 Jun 11:18:54 ntpdate[91982]: step time server 120.25.115.20 offset 0.935068 sec
[root@localhost ~]# systemctl start ntpd