Score:0

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

pg flag

In my lubuntu 22.04 is active the service systemd-timesyncd. 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

Artur Meinild avatar
vn flag
Hard to tell. Please clarify: How long has it been like this (it might be temporary situation)? You could also try to configure another timeserver in `/etc/systemd/timesyncd.conf`.
FedKad avatar
cn flag
Your Internet service provider may be filtering NTP UDP requests. Please install `ntpdate` and try `ntpdate -q 91.189.94.4` (with _no_ `sudo`).
frankfalse avatar
pg flag
@ArturMeinild It is not a temporary situation and I have tried with other server NTP (time1.google.com, time2.google.com, time-a-g.nist.gov, and so on) with the same Time-Out error in the reply.
Artur Meinild avatar
vn flag
@FedKad is probably right, then the problem must be that the NTP request are filtered out on the network. Unfortunately, this situation has *nothing* to do with Ubuntu.
Score:1
pg flag

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.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.