$ sudo journalctl -fu chrony
-- Logs begin at Thu 2019-11-14 03:51:16 UTC. --
Nov 22 01:46:40 miranda-ntp-server-01 chronyd[5984]: Selected source 169.254.169.123
Nov 22 02:29:29 miranda-ntp-server-01 systemd[1]: Stopping chrony, an NTP client/server...
Nov 22 02:29:29 miranda-ntp-server-01 systemd[1]: Stopped chrony, an NTP client/server.
Nov 22 02:29:29 miranda-ntp-server-01 systemd[1]: Starting chrony, an NTP client/server...
Nov 22 02:29:29 miranda-ntp-server-01 chronyd[9999]: chronyd version 3.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SECHASH +SIGND +ASYNCDNS +IPV6 -DEBUG)
Nov 22 02:29:29 miranda-ntp-server-01 chronyd[9999]: Could not open IPv6 NTP socket : Address family not supported by protocol
Nov 22 02:29:29 miranda-ntp-server-01 systemd[1]: Started chrony, an NTP client/server.
Nov 22 02:29:29 miranda-ntp-server-01 chronyd[9999]: Frequency 29.566 +/- 0.024 ppm read from /var/lib/chrony/drift
Nov 22 02:29:29 miranda-ntp-server-01 chronyd[9999]: Using right/UTC timezone to obtain leap second data
Nov 22 02:29:34 miranda-ntp-server-01 chronyd[9999]: Selected source 169.254.169.123
$ sudo cat /lib/systemd/system/chrony.service
[Unit]
Description=chrony, an NTP client/server
Documentation=man:chronyd(8) man:chronyc(1) man:chrony.conf(5)
Conflicts=systemd-timesyncd.service openntpd.service
After=network.target
ConditionCapability=CAP_SYS_TIME
[Service]
Type=forking
PIDFile=/run/chronyd.pid
ExecStart=/usr/sbin/chronyd -4
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full
[Install]
Alias=chronyd.service
WantedBy=multi-user.target为了澄清这一点,我想禁用chrony使用ipv6。
发布于 2019-11-22 03:46:14
显然,您告诉它只使用IPv4运行,而不是IPv6运行:
ExecStart=/usr/sbin/chronyd -4这在编年史(8)手册页上有记录:
选项-4将只将主机名解析为IPv4地址,only IPv4套接字将被创建。-6使用此选项,主机名将仅解析为IPv6地址,并将只创建IPv6套接字。
https://serverfault.com/questions/992844
复制相似问题