2

My chrony time server can get the time from another internal time server but not from time servers on the Internet:

chronyc sources
210 Number of sources = 9
MS Name/IP address         Stratum Poll Reach LastRx Last sample
===============================================================================
^? ptbtime1.ptb.de               0   7     0     -     +0ns[   +0ns] +/-    0ns
^? static.133.158.47.78.cli>     0   7     0     -     +0ns[   +0ns] +/-    0ns
^? alpha.rueckgr.at              0   7     0     -     +0ns[   +0ns] +/-    0ns
^? stratum2-2.NTP.TechFak.N>     0   7     0     -     +0ns[   +0ns] +/-    0ns
^? totoro.ax86.net               0   7     0     -     +0ns[   +0ns] +/-    0ns
^? 195.50.171.101                0   7     0     -     +0ns[   +0ns] +/-    0ns
^? 82.165.77.164                 0   7     0     -     +0ns[   +0ns] +/-    0ns
^? 79.133.44.136                 0   7     0     -     +0ns[   +0ns] +/-    0ns
^? ntp1.radio-sunshine.org       0   7     0     -     +0ns[   +0ns] +/-    0ns


chronyc tracking
Reference ID    : 00000000 ()
Stratum         : 0
Ref time (UTC)  : Thu Jan 01 00:00:00 1970
System time     : 0.000000009 seconds fast of NTP time
Last offset     : +0.000000000 seconds
RMS offset      : 0.000000000 seconds
Frequency       : 0.379 ppm fast
Residual freq   : +0.000 ppm
Skew            : 0.000 ppm
Root delay      : 1.000000000 seconds
Root dispersion : 1.000000000 seconds
Update interval : 0.0 seconds
Leap status     : Not synchronised


nc -zvu ptbtime1.ptb.de 123
Connection to ptbtime1.ptb.de 123 port [udp/ntp] succeeded!

I would be very happy to receive tips that would lead to problem solving.


No, none of your sources are returning NTP packets, including ptbtime1.ptb.de. ? state is unreachable, same as 0 for reach. nc is not a full test, it just sends a few UDP packets with nothing in them.

Which tool can I use instead? I tried nmap socat on the other NTP Server but I was not able to establish a connection

Check if chrony thinks it is online with chronyc activity.

  chronyc activity
200 OK
39 sources online
0 sources offline
0 sources doing burst (return to online)
0 sources doing burst (return to offline)
0 sources with unknown address

Restore network connection and tell chrony about it with chronyc online

netplan apply
chronyc online
200 OK

Check firewalls allow udp/123 destination.

Pleas let me know which tool shall I use.

But we can see that the Firewall is open:

telnet www.google.de 80
Trying 216.58.212.163...
Connected to www.google.de.

nc -zvu ptbtime1.ptb.de 123
Connection to ptbtime1.ptb.de 123 port [udp/ntp] succeeded!

Check your local NTP service is running and allows this host

 chrony.service - chrony, an NTP client/server
     Loaded: loaded (/lib/systemd/system/chrony.service; enabled; vendor preset: enabled)
     Active: active (running) since Wed 2020-12-23 09:56:51 CET; 2h 12min ago
       Docs: man:chronyd(8)
             man:chronyc(1)
             man:chrony.conf(5)
   Main PID: 221814 (chronyd)
      Tasks: 2 (limit: 1074)
     Memory: 1.7M
     CGroup: /system.slice/chrony.service
             ├─221814 /usr/sbin/chronyd -F -1
             └─221815 /usr/sbin/chronyd -F -1

Dec 23 12:05:19 chrony-time-server chronyd[221814]: Source 2606:4700:f1::1 offline
Dec 23 12:05:19 chrony-time-server chronyd[221814]: Source 2a01:4f8:221:b52::2 offline
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2607:f8f8:721:e301::123 online
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2a01:4f8:141:282::5:1 online
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2402:1f00:8000:800::414 online
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2a01:4f8:202:144d::2 online
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2001:67c:1560:8003::c7 online
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2001:67c:1560:8003::c8 online
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2606:4700:f1::1 online
Dec 23 12:05:30 chrony-time-server chronyd[221814]: Source 2a01:4f8:221:b52::2 online

It shows that sources are online.

Try NTP servers known to provide public access, such as 2.pool.ntp.org

nano /etc/chrony/chrony.conf


pool pool.ntp.org iburst

server 192.53.103.108 iburst

pool 2.pool.ntp.org iburst

server 0.de.pool.ntp.org iburst
server 1.de.pool.ntp.org iburst
server 2.de.pool.ntp.org iburst
server 3.de.pool.ntp.org iburst


pool ntp.ubuntu.com        iburst maxsources 4
pool 0.ubuntu.pool.ntp.org iburst maxsources 1
pool 1.ubuntu.pool.ntp.org iburst maxsources 1
pool 2.ubuntu.pool.ntp.org iburst maxsources 2

Compare to a working device on your network that has NTP service.

The actual time server is running with ntp.serive

● ntp.service - Network Time Service
     Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2020-11-12 09:47:21 CET; 1 months 10 days ago
       Docs: man:ntpd(8)
   Main PID: 773 (ntpd)
      Tasks: 2 (limit: 1074)
     Memory: 2.0M
     CGroup: /system.slice/ntp.service
             └─773 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 112:117

Dec 22 12:40:07 ntp-time-server ntpd[773]: Soliciting pool server 136.243.202.118
Dec 22 12:40:08 ntp-time-server ntpd[773]: Soliciting pool server 131.234.220.232
Dec 22 12:40:10 ntp-time-server ntpd[773]: Soliciting pool server 78.46.162.102
Dec 22 12:40:11 ntp-time-server ntpd[773]: Soliciting pool server 213.239.239.165
Dec 22 12:40:12 ntp-time-server ntpd[773]: Soliciting pool server 144.76.76.107
Dec 22 12:40:13 ntp-time-server ntpd[773]: Soliciting pool server 82.100.248.10
Dec 22 13:52:03 ntp-time-server ntpd[773]: Soliciting pool server 195.201.163.190
Dec 22 13:52:04 ntp-time-server ntpd[773]: Soliciting pool server 162.159.200.1
Dec 23 05:50:20 ntp-time-server ntpd[773]: 213.239.239.165 local addr 10.0.16.254 -> <null>
Dec 23 09:46:11 ntp-time-server ntpd[773]: Soliciting pool server 162.159.200.123

ntpstat
synchronised to NTP server (79.133.44.141) at stratum 2
   time correct to within 16 ms
   polling server every 128 s

I have checked everything and it seems that everything is ok but chrony still does not work:

 chronyc tracking
Reference ID    : 00000000 ()
Stratum         : 0
Ref time (UTC)  : Thu Jan 01 00:00:00 1970
System time     : 0.000000027 seconds fast of NTP time
Last offset     : +0.000000000 seconds
RMS offset      : 0.000000000 seconds
Frequency       : 0.379 ppm fast
Residual freq   : +0.000 ppm
Skew            : 0.000 ppm
Root delay      : 1.000000000 seconds
Root dispersion : 1.000000000 seconds
Update interval : 0.0 seconds
Leap status     : Not synchronised

 chronyc ntpdata

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 24
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
Reference time  : Thu Jan 01 00:00:00 1970
Offset          : +0.000000000 seconds
Peer delay      : 0.000000000 seconds
Peer dispersion : 0.000000000 seconds
Response time   : 0.000000000 seconds
Jitter asymmetry: +0.00
NTP tests       : 000 000 0000
Interleaved     : No
Authenticated   : No
TX timestamping : Invalid
RX timestamping : Invalid
Total TX        : 0
Total RX        : 0
Total valid RX  : 0

Remote address  : [UNSPEC] (00000000)
Remote port     : 0
Local address   : [UNSPEC] (00000000)
Leap status     : Normal
Version         : 0
Mode            : Invalid
Stratum         : 0
Poll interval   : 0 (1 seconds)
Precision       : 0 (1.000000000 seconds)
Root delay      : 0.000000 seconds
Root dispersion : 0.000000 seconds
Reference ID    : 00000000 ()
sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
tom
  • 29
  • 1
  • 1
  • 2
  • 1
    While testing with actual NTP commands is necessary, `ntpdate` is not required on a chrony system. `chronyc sources ` shows peer reachability, `chronyc ntpdata` shows packet details, `chronyc burst` sends a few packets now. – John Mahowald Dec 22 '20 at 17:45
  • 1
    The question has been closed to give you a chance to edit it - you need to move some of your comments from your answers into the question and then delete them. Then the question can be reviewed and possibly re-opened. – Ward - Trying Codidact Dec 27 '20 at 17:46

1 Answers1

1

No, none of your sources are returning NTP packets, including ptbtime1.ptb.de. ? state is unreachable, same as 0 for reach. nc is not a full test, it just sends a few UDP packets with nothing in them.

  • Check if chrony thinks it is online with chronyc activity. Restore network connection and tell chrony about it with chronyc online
  • Check firewalls allow udp/123 destination.
  • Check your local NTP service is running and allows this host.
  • Try NTP servers known to provide public access, such as 2.pool.ntp.org

Compare to a working device on your network that has NTP service.

John Mahowald
  • 32,050
  • 2
  • 19
  • 34