Why the timesyncd client does not receive any reply from the NTP server (time out in reply)?

In my lubuntu 22.04 is active the service systemd-timesyncd.service which starts the daemon systemd-timesyncd (see here the documentation). This is the status of this service:

> systemctl status systemd-timesyncd

# this is the output of the previous command:
● 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).

The output shows that the service is running and tries to connect to the NTP server ntp.ubuntu.com but it does not receive any reply (see messages Timed out waiting for reply from ntp.ubuntu.com); this server is reachable by ping as we can see by the output of the following command:

> 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

The firewall iptables is not active:

> sudo iptables --list
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 

Can someone tell me why the timesyncd client does not receive any reply from the NTP server ntp.ubuntu.com?

Thanks

Asked By: User051209

||

The problem was in the Internet service provider

Thank for your comments. I have tried to connect to another network which is able to connect to Internet by an other way respect of the network which I used when I have written the post.
By this other network and without any modification to the configuration file /etc/systemd/timesyncd.conf which is:

[Time]
#NTP=
#FallbackNTP=ntp.ubuntu.com
#RootDistanceMaxSec=5
#PollIntervalMinSec=32
#PollIntervalMaxSec=2048

the NTP client systemd timesyncd can synchronize the system date to the NTP server ntp.ubuntu.com.

In fact the status of the service systemd-timesyncd.service is the following:

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 14:12:48 CEST; 46min ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 2065 (systemd-timesyn)
     Status: "Initial synchronization to time server 185.125.190.56:123 (ntp.ubuntu.com)."
      Tasks: 2 (limit: 2030)
     Memory: 1.3M
        CPU: 203ms
     CGroup: /system.slice/systemd-timesyncd.service
             └─2065 /lib/systemd/systemd-timesyncd

lug 06 14:12:48 ceia-te systemd[1]: Starting Network Time Synchronization...
lug 06 14:12:48 ceia-te systemd[1]: Started Network Time Synchronization.
lug 06 14:12:13 ceia-te systemd-timesyncd[2065]: Initial synchronization to time server 185.125.190.56:123 (ntp.ubuntu.com).

So without any modification to the lubuntu configuration and without installing any other package the system works correctly.

Answered By: User051209