1.遇到报错Job for chronyd.service failed because the control process exited with error code. See "systemctl status chronyd.service" and "journalctl -xe" for details..
2.解决方法
删除service开头多余的“#”号
[root@compute ~]# vi /etc/chrony.conf
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
###server 0.centos.pool.ntp.org iburst
###server 1.centos.pool.ntp.org iburst
###server 2.centos.pool.ntp.org iburst
###server 3.centos.pool.ntp.org iburst
#server controller iburstserver controller iburstserver controller iburst
删除多余的“#”号
3.重启chronyd
[root@compute ~]# systemctl restart chronyd
[root@compute ~]# systemctl status chronyd
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; enabled; vendor preset: enabled)
Active: active (running) since 三 2024-11-20 20:39:56 CST; 2s ago
Docs: man:chronyd(8)
man:chrony.conf(5)
Process: 1489 ExecStartPost=/usr/libexec/chrony-helper update-daemon (code=exited, status=0/SUCCESS)
Process: 1486 ExecStart=/usr/sbin/chronyd $OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 1488 (chronyd)
CGroup: /system.slice/chronyd.service
└─1488 /usr/sbin/chronyd
11月 20 20:39:56 compute systemd[1]: Starting NTP client/server...
11月 20 20:39:56 compute chronyd[1488]: chronyd version 3.2 starting (+CMDMON +N...G)
11月 20 20:39:56 compute chronyd[1488]: Frequency 3.242 +/- 0.099 ppm read from ...ft
11月 20 20:39:56 compute systemd[1]: Started NTP client/server.
Hint: Some lines were ellipsized, use -l to show in full.
4.效果图