Мой хронический сервер времени может получать время от другого внутреннего сервера времени, но не от серверов времени в Интернете:
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!
Я был бы очень рад получить советы, которые помогут решить проблему.
Нет, ни один из ваших источников не возвращает пакеты NTP, включая ptbtime1.ptb.de. ? состояние недоступно, то же самое, что 0 для охвата. nc не является полным тестом, он просто отправляет несколько пакетов UDP, в которых ничего нет.
Какой инструмент я могу использовать вместо этого? Я попробовал nmap socat на другом сервере NTP, но мне не удалось установить соединение
Проверьте, считает ли chrony, что он находится в сети с активностью chronyc.
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
Восстановите сетевое соединение и сообщите об этом chrony с помощью chronyc онлайн.
netplan apply
chronyc online
200 OK
Убедитесь, что брандмауэры разрешают назначение udp / 123.
Пожалуйста, дайте мне знать, какой инструмент мне использовать.
Но мы видим, что брандмауэр открыт:
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!
Убедитесь, что ваша локальная служба NTP работает и разрешает этот хост.
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
Это показывает, что источники находятся в сети.
Попробуйте серверы NTP, которые, как известно, предоставляют общий доступ, например 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
Сравните с рабочим устройством в вашей сети, имеющим службу NTP.
Фактический сервер времени работает с 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
Я все проверил и кажется, что все в порядке, но хрони по-прежнему не работает:
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 ()
Нет, ни один из ваших источников не возвращает пакеты NTP, включая ptbtime1.ptb.de
. Состояние ?
недостижимо, то же, что и 0
для достижения. nc
не является полным тестом, он просто отправляет несколько пакетов UDP, в которых ничего нет.
хронической активности
. Восстановите сетевое соединение и сообщите об этом хрони через хроник онлайн
2.pool.ntp.org
Сравните с работающим устройством в вашей сети, на котором есть служба NTP.