工作常见问题总结:ntp同步

今天发现个问题,centos7同步时间有报错

[root@hadoop2 cm-5.8.3]# ntpdate  pool.ntp.org
 9 Dec 04:53:19 ntpdate[63834]: the NTP socket is in use, exiting

原因是他已经启动了ntp服务,这里我把他关掉以后,重新同步就正常了

[root@hadoop2 cm-5.8.3]# systemctl  stop ntpd.service
[root@hadoop2 cm-5.8.3]# ntpdate  pool.ntp.org
 8 Dec 20:54:18 ntpdate[63943]: step time server 120.25.108.11 offset -28795.548308 sec
[root@hadoop2 cm-5.8.3]# date
Thu Dec  8 20:54:20 EST 2016
[root@hadoop2 cm-5.8.3]#systemctl  disable ntpd.service #关闭开机启动