Bonjour,
Je me suis aperçu d’un problème de synchonisation de la date par ntpd sur ma debian buster. J’ai ntpd qui est installé.
# systemctl status ntp
● ntp.service - Network Time Service
Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-06-22 21:45:51 UTC; 2 years 5 months ago
Docs: man:ntpd(8)
Process: 801 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
Main PID: 813 (ntpd)
Memory: 1.4M
CGroup: /system.slice/ntp.service
└─813 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 108:114
# timedatectl
Local time: Thu 2021-12-02 18:15:07 UTC
Universal time: Thu 2021-12-02 18:15:07 UTC
RTC time: Thu 2021-12-02 18:15:08
Time zone: Etc/UTC (UTC, +0000)
System clock synchronized: yes
NTP service: inactive
RTC in local TZ: no
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
0.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
1.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
2.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
3.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
#78.251.129.10 193.52.184.106 2 u 43 64 177 13.011 -3.182 0.693
#ntp-1.arkena.ne 145.238.203.14 2 u 43 64 175 15.121 -2.888 0.685
-aru11.polo-unia 193.204.114.233 2 u 54 64 37 37.215 -1.245 0.185
-cp01.webhd.nl 195.154.174.209 3 u 49 64 77 8.531 0.892 1.065
+ip139.ip-5-196- 145.238.203.14 2 u 10 64 377 8.666 0.270 0.530
-lul1.ntp.netnod .PPS. 1 u 13 64 77 48.454 -0.261 0.246
-ntp10.kashra-se 90.187.148.77 2 u 16 64 377 9.099 0.189 1.121
-dalaran.sceen.n 145.238.203.14 2 u 40 64 177 8.543 -0.027 0.588
#backup.kabelnet 195.238.74.240 3 u 381 64 140 23.494 -0.789 0.646
-fluffykins.posi 85.199.214.98 2 u 43 64 177 12.293 -0.683 1.263
#ns1.pulsation.f 84.239.67.14 2 u 14 64 177 8.814 0.188 0.336
*85.199.214.98 .GPS. 1 u 21 64 177 13.271 0.748 0.122
-ntp2.torix.ca .PTP0. 1 u 13 64 377 85.850 0.621 0.481
+leeto.nicolbola 145.238.203.14 2 u 12 64 377 5.700 0.682 0.545
Pour vérifier que la synchro marchait bien, j’ai forcé une date erroné pour vérifier que le système allait se remettre à la bonne date tout seul:
# timedatectl set-time "2019-06-22 13:41:00"
et la surprise, quand j’interroge la date du système quelques secondes apres, ce dernier ets toujours à la mauvaise date
# date
Sat 22 Jun 2019 01:41:07 PM UTC
alors que ntpd tourne toujours:
# systemctl status ntp
● ntp.service - Network Time Service
Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-06-22 21:45:51 UTC; 8h left
Docs: man:ntpd(8)
Process: 801 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
Main PID: 813 (ntpd)
Memory: 1.4M
CGroup: /system.slice/ntp.service
└─813 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 108:114
Dec 02 18:08:05 b-0094 ntpd[813]: Listen normally on 3 tun0 192.168.160.148:123
Dec 02 18:08:05 b-0094 ntpd[813]: new interface(s) found: waking up resolver
Dec 02 18:17:35 b-0094 ntpd[813]: 213.109.127.82 local addr 10.168.2.160 -> <null>
Dec 02 18:17:38 b-0094 ntpd[813]: 95.81.173.8 local addr 10.168.2.160 -> <null>
Dec 02 18:17:40 b-0094 ntpd[813]: 78.251.129.10 local addr 10.168.2.160 -> <null>
Dec 02 18:18:10 b-0094 ntpd[813]: 80.74.64.1 local addr 10.168.2.160 -> <null>
Dec 02 18:18:38 b-0094 ntpd[813]: 95.110.248.206 local addr 10.168.2.160 -> <null>
Dec 02 18:19:17 b-0094 ntpd[813]: 194.58.206.20 local addr 10.168.2.160 -> <null>
Jun 22 13:41:13 b-0094 ntpd[813]: 151.80.211.8 local addr 10.168.2.160 -> <null>
Jun 22 13:41:22 b-0094 ntpd[813]: 164.132.166.29 local addr 10.168.2.160 -> <null>
# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
0.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
1.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
2.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
3.debian.pool.n .POOL. 16 p - 64 0 0.000 0.000 0.002
+ip139.ip-5-196- 145.238.203.14 2 u 4 64 377 8.642 0.753 2920089
-ntp10.kashra-se 90.187.148.77 2 u 7 64 377 9.207 1.276 2920089
-fluffykins.posi 85.199.214.98 2 u 37 64 377 12.295 0.841 2920089
*85.199.214.98 .GPS. 1 u 18 64 377 13.271 0.748 2920089
-ntp2.torix.ca .PTP0. 1 u 6 64 377 85.855 1.011 2920089
+leeto.nicolbola 145.238.203.14 2 u 2 64 377 5.702 1.175 2920089
Quelques minutes après, toujours la mauvaise date:
# date
Sat 22 Jun 2019 01:44:19 PM UTC
et le service ntp en rade
# systemctl status ntp
● ntp.service - Network Time Service
Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-06-22 13:45:52 UTC; 4s ago
Docs: man:ntpd(8)
Process: 801 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
Main PID: 813 (code=exited, status=255/EXCEPTION)
Dec 02 18:18:38 b-0094 ntpd[813]: 95.110.248.206 local addr 10.168.2.160 -> <null>
Dec 02 18:19:17 b-0094 ntpd[813]: 194.58.206.20 local addr 10.168.2.160 -> <null>
Jun 22 13:41:13 b-0094 ntpd[813]: 151.80.211.8 local addr 10.168.2.160 -> <null>
Jun 22 13:41:22 b-0094 ntpd[813]: 164.132.166.29 local addr 10.168.2.160 -> <null>
Jun 22 13:45:39 b-0094 ntpd[813]: Soliciting pool server 91.224.149.41
Jun 22 13:45:40 b-0094 ntpd[813]: Soliciting pool server 95.81.173.155
Jun 22 13:45:49 b-0094 ntpd[813]: Soliciting pool server 156.106.214.48
Jun 22 13:45:49 b-0094 ntpd[813]: Soliciting pool server 2001:41d0:8:4d0d::1
Jun 22 13:45:52 b-0094 systemd[1]: ntp.service: Main process exited, code=exited, status=255/EXCEPTION
Jun 22 13:45:52 b-0094 systemd[1]: ntp.service: Failed with result 'exit-code'.
Si je relance le service ntp à la main, le système se remet à la « bonne » heure.
Que peut-il bien se passer, pourquoi ntpd se plante ainsi? c’est systématique
Je n’arrive pas à comprendre.
Si quelqu’un comprend merci de bien vouloir éclairer ma lanterne.
Cordialement,