作者张华 发表于2026-07-23版权声明可以任意转载转载时请务必以超链接形式标明文章原始出处和作者信息及本版权声明自从我换老板之后我感觉我每次都是准时参会的但我老板总喜欢ping我原来全是时间服务器惹得祸。我发现mattermost和我的手机上的时间都比我本地电脑的时间快一分钟而我是看着本地电脑的时间准时参会的所以我每次会比别人晚一分钟所以误会就产生了。1, The automatic time synchronization has been turned on, but the time synchronization was not successful (System clock synchronized: no)huay9000p:~$ timedatectl status Local time: 四 2026-07-23 10:15:40 CST Universal time: 四 2026-07-23 02:15:40 UTC RTC time: 四 2026-07-23 02:15:14 Time zone: Asia/Shanghai (CST, 0800) System clock synchronized: no NTP service: active RTC in local TZ: no2, My machine does not have an IPv6 address, but ntp.ubuntu.com is using an IPv6 address (2620:2d:4000:1::3f)huay9000p:~$ timedatectl timesync-status Server: 2620:2d:4000:1::3f (ntp.ubuntu.com) Poll interval: 34min 8s (min: 32s; max 34min 8s) Packet count: 0 huay9000p:~$ ip -6 route get 2620:2d:4000:1::3f RTNETLINK answers: Network is unreachable huay9000p:~$ ip addr show wlp130s0f0 3: wlp130s0f0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 98:fe:3e:20:6a:d4 brd ff:ff:ff:ff:ff:ff inet 192.168.3.130/24 brd 192.168.3.255 scope global dynamic noprefixroute wlp130s0f0 valid_lft 552060sec preferred_lft 552060sec inet6 fe80::300:c64:a190:e6ee/64 scope link noprefixroute valid_lft forever preferred_lft forever3, It should be because ntp.ubuntu.com timed out when using an IPv4 address, so it switched to using an IPv6 address.huay9000p:~$ journalctl -u systemd-timesyncd -b --no-pager |grep -i timed out |wc -l 2584 huay9000p:~$ journalctl -u systemd-timesyncd -b --no-pager |grep -i timed out |tail -n1 7月 23 09:58:32 y9000p systemd-timesyncd[1792]: Timed out waiting for reply from 185.125.190.58:123 (ntp.ubuntu.com). huay9000p:~$ resolvectl query ntp.ubuntu.com ntp.ubuntu.com: 2620:2d:4000:1::41 -- link: wlp130s0f0 2620:2d:4000:1::40 -- link: wlp130s0f0 2620:2d:4000:1::3f -- link: wlp130s0f0 91.189.91.157 -- link: wlp130s0f0 185.125.190.58 -- link: wlp130s0f0 185.125.190.57 -- link: wlp130s0f0 185.125.190.56 -- link: wlp130s0f04, But this command (nc -vzu ntp.ubuntu.com 123) is successful now.huay9000p:~$ nc -vzu ntp.ubuntu.com 123 Connection to ntp.ubuntu.com (185.125.190.58) 123 port [udp/ntp] succeeded!5, After adding the domain ntp.ubuntu.com into whitelist in my routerhuay9000p:~$ journalctl -u systemd-timesyncd -b --no-pager -f ... 7月 23 09:58:32 y9000p systemd-timesyncd[1792]: Timed out waiting for reply from 185.125.190.58:123 (ntp.ubuntu.com). 7月 23 10:34:01 y9000p systemd-timesyncd[1792]: Contacted time server 185.125.190.58:123 (ntp.ubuntu.com). 7月 23 10:34:01 y9000p systemd-timesyncd[1792]: Initial clock synchronization to Thu 2026-07-23 10:34:01.939524 CST.6, Maybe I can also use the following configuration instead.sudo timedatectl set-timezone Asia/Shanghai sudo sed -i s/#RootDistanceMaxSec5/RootDistanceMaxSec999999999/ /etc/systemd/timesyncd.conf sudo sed -i s/#NTP/NTPntp.aliyun.com/ /etc/systemd/timesyncd.conf systemctl restart systemd-timesyncd