ntp boot failure

1 ntp boot can not start automatically

1.1 Query ntp status

[root@host-172-18-0-37 ~]# service ntpd status
Redirecting to /bin/systemctl status  ntpd.service
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: inactive (dead)

1.2 Query whether ntp is set to start automatically at boot

[root@host-172-18-0-37 ~]# systemctl is-enabled ntpd
enabled

It means that ntp has been set to start automatically at boot, but the boot is not successful. The most common cause of this problem is a tool installed on the system that conflicts with NTP: chrony.

1.3 Query whether chrony is set to enabled

[root@host-172-18-0-37 ~]# systemctl is-enabled chronyd
enabled

2 Solutions

systemctl disable chronyd

Restart the machine and check the status of ntp:

[root@host-172-18-0-37 ~]# service ntpd status
Redirecting to /bin/systemctl status  ntpd.service
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2018-04-27 14:11:59 CST; 4min 12s ago
  Process: 632 ExecStart=/usr/sbin/ntpd -u ntp:ntp $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 643 (ntpd)
   CGroup: /system.slice/ntpd.service
           └─643 /usr/sbin/ntpd -u ntp:ntp -g

Apr 27 14:11:59 localhost.localdomain ntpd[643]: Listening on routing socket on fd #20 for interface updates
Apr 27 14:11:59 localhost.localdomain ntpd[643]: 0.0.0.0 c016 06 restart
Apr 27 14:11:59 localhost.localdomain ntpd[643]: 0.0.0.0 c012 02 freq_set kernel 24.633 PPM
Apr 27 14:11:59 localhost.localdomain systemd[1]: Started Network Time Service.
Apr 27 14:12:03 host-172-18-0-37 ntpd[643]: Listen normally on 4 eth0 172.18.0.37 UDP 123
Apr 27 14:12:03 host-172-18-0-37 ntpd[643]: Listen normally on 5 eth0 fe80::f816:3eff:fefa:262c UDP 123
Apr 27 14:12:03 host-172-18-0-37 ntpd[643]: new interface(s) found: waking up resolver
Apr 27 14:12:10 host-172-18-0-37 ntpd[643]: 0.0.0.0 c61c 0c clock_step -225.297501 s
Apr 27 14:08:25 host-172-18-0-37 ntpd[643]: 0.0.0.0 c614 04 freq_mode
Apr 27 14:08:26 host-172-18-0-37 ntpd[643]: 0.0.0.0 c618 08 no_sys_peer

problem solved.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324974114&siteId=291194637
NTP