systemd-timesyncd无法接收NTP服务器回复(超时)的原因排查求助
systemd-timesyncd无法接收NTP服务器回复(超时)的原因排查求助
大家好,我在Lubuntu 22.04上启用了systemd-timesyncd.service服务,用来运行systemd-timesyncd守护进程。现在遇到个问题想请教各位:
我先查看了这个服务的状态,执行的命令是:
systemctl status systemd-timesyncd
得到的输出如下:
● systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2023-07-06 12:21:43 CEST; 2min 54s ago Docs: man:systemd-timesyncd.service(8) Main PID: 1917 (systemd-timesyn) Status: "Idle." Tasks: 2 (limit: 2030) Memory: 1.3M CPU: 201ms CGroup: /system.slice/systemd-timesyncd.service └─1917 /lib/systemd/systemd-timesyncd lug 06 12:21:55 ceia-te systemd-timesyncd[1917]: Timed out waiting for reply from 185.125.190.57:123 (ntp.ubuntu.com). lug 06 12:22:05 ceia-te systemd-timesyncd[1917]: Timed out waiting for reply from 185.125.190.58:123 (ntp.ubuntu.com). lug 06 12:22:15 ceia-te systemd-timesyncd[1917]: Timed out waiting for reply from 185.125.190.56:123 (ntp.ubuntu.com). lug 06 12:22:25 ceia-te systemd-timesyncd[1917]: Timed out waiting for reply from 91.189.94.4:123 (ntp.ubuntu.com).
从输出能看到服务是正常运行的,但尝试连接NTP服务器ntp.ubuntu.com时一直收不到回复,反复出现超时提示。不过我用ping测试这个服务器是能通的,执行的命令是:
ping ntp.ubuntu.com
输出如下:
PING ntp.ubuntu.com (91.189.94.4) 56(84) bytes of data. 64 bytes from pugot.canonical.com (91.189.94.4): icmp_seq=1 ttl=53 time=30.0 ms 64 bytes from pugot.canonical.com (91.189.94.4): icmp_seq=2 ttl=53 time=29.8 ms 64 bytes from pugot.canonical.com (91.189.94.4): icmp_seq=3 ttl=53 time=29.8 ms
另外,我检查了iptables防火墙,它处于未激活状态,执行命令:
sudo iptables --list
输出显示所有链的策略都是ACCEPT:
Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination
现在我实在搞不懂,为什么timesyncd客户端就是收不到ntp.ubuntu.com的回复呢?有没有大佬能帮忙分析下原因?谢谢!
备注:内容来源于stack exchange,提问作者User051209
相关产品推荐
相关产品推荐

