4

I'm struggling to synchronize my system clock on Pop OS 21.04.

I've read a lot of posts on the subject but it doesn't seem to help.

my system clock are not synchronized, which caused issues with loading some resources (e.g. gitlab)

$ timedatectl 
               Local time: Sat 2021-10-09 23:02:20 CEST
           Universal time: Sat 2021-10-09 21:02:20 UTC
                 RTC time: Sat 2021-10-09 21:02:21
                Time zone: Europe/Madrid (CEST, +0200)
System clock synchronized: no
              NTP service: active
          RTC in local TZ: no

my timesyncd.conf looks as following

[Time]
NTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org
FallbackNTP=ntp.ubuntu.com
RootDistanceMaxSec=5
PollIntervalMinSec=32
PollIntervalMaxSec=2048

I've changed NTP servers several time, used IPs and different servers but no matter what I do I always end up with:

$ 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 Sat 2021-10-09 22:42:10 CEST; 23min ago
       Docs: man:systemd-timesyncd.service(8)
   Main PID: 9955 (systemd-timesyn)
     Status: "Connecting to time server 162.159.200.123:123 (1.pool.ntp.org)."
      Tasks: 2 (limit: 37919)
     Memory: 1.1M
     CGroup: /system.slice/systemd-timesyncd.service
             └─9955 /lib/systemd/systemd-timesyncd

Oct 09 22:55:08 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 69.164.213.136:123 (0.pool.ntp.org).
Oct 09 22:55:18 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 82.64.172.48:123 (0.pool.ntp.org).
Oct 09 22:55:29 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 85.25.128.62:123 (0.pool.ntp.org).
Oct 09 22:55:39 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 216.197.228.230:123 (0.pool.ntp.org).
Oct 09 22:55:49 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 185.132.136.116:123 (1.pool.ntp.org).
Oct 09 22:55:59 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 5.56.160.3:123 (1.pool.ntp.org).
Oct 09 22:56:10 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 162.159.200.123:123 (2.pool.ntp.org).
Oct 09 22:56:20 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 185.18.52.78:123 (2.pool.ntp.org).
Oct 09 23:05:02 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 51.38.162.10:123 (0.pool.ntp.org).
Oct 09 23:05:13 pop-os systemd-timesyncd[9955]: Timed out waiting for reply from 90.165.120.190:123 (0.pool.ntp.org).

AFAIK it uses 123 udp port to send requests, I don't have any firewall and it seems it's accessible

$ nc -vzu 0.pool.ntp.org 123
Connection to 0.pool.ntp.org (90.165.120.190) 123 port [udp/ntp] succeeded!

any help on how to synchronize system clock?

Pavel K
  • 141
  • 1
  • 3

1 Answers1

0

I had the same issue with my ntp server not responding. I am using chronyd. I read this "You need to add an allow directive to the chrony.conf file in order for chronyd to open the server NTP port and respond to client requests." at https://chrony.tuxfamily.org/faq.html

echo "allow" >> /etc/chrony/chrony.conf

and mine now works