inf1d3l
Goto Top

NTP-Quelle ändern

Hallo,

ich habe hier eine kleine Debian 10 - VM und versuche grad, die NTP-Serverquellen zu ändern, weil diese sich geändert haben. In der /etc/ntp.conf stehen die neuen Adressen. Trotz rebootund dpkg-reconfigure ntp zeigt ntpq -p noch die alten Adressen an. datezeigt die richtige Zeit an. Und (die letzten beiden Zeilen):

root@vm:~# systemctl status ntp

● ntp.service - Network Time Service
   Loaded: loaded (/lib/systemd/system/ntp.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-12-14 14:17:37 CET; 1 day 21h ago
     Docs: man:ntpd(8)
  Process: 981 ExecStart=/usr/lib/ntp/ntp-systemd-wrapper (code=exited, status=0/SUCCESS)
 Main PID: 987 (ntpd)
    Tasks: 2 (limit: 2358)
   Memory: 1.2M
   CGroup: /system.slice/ntp.service
           └─987 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 108:115

Dez 14 14:17:37 vm ntpd[987]: proto: precision = 0.058 usec (-24)
Dez 14 14:17:37 vm ntpd[987]: restrict 0.0.0.0: KOD does nothing without LIMITED.
Dez 14 14:17:37 vm ntpd[987]: restrict ::: KOD does nothing without LIMITED.
Dez 14 14:17:37 vm ntpd[987]: Listen and drop on 0 v6wildcard [::]:123
Dez 14 14:17:37 vm ntpd[987]: Listen and drop on 1 v4wildcard 0.0.0.0:123
Dez 14 14:17:37 vm ntpd[987]: Listen normally on 2 lo 127.0.0.1:123
Dez 14 14:17:37 vm ntpd[987]: Listen normally on 3 eth0 10.10.10.18:123
Dez 14 14:17:37 vm ntpd[987]: Listening on routing socket on fd #20 for interface updates
Dez 14 14:17:37 vm ntpd[987]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Dez 14 14:17:37 vm ntpd[987]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized

Was mache ich falsch? Danke Sehr!

Content-Key: 632184

Url: https://administrator.de/contentid/632184

Printed on: April 23, 2024 at 08:04 o'clock

Mitglied: 146707
Solution 146707 Dec 16, 2020 updated at 11:08:44 (UTC)
Goto Top
Geb mal
timedatectl
ein.
Steht dort ein NTP Service = active"?
Wenn ja nutzt dein System stattdessen den Service systemd-timesyncd und dessen Config liegt unter /etc/systemd/timesyncd.conf, wo man die NTP Server über NTP=xxxxxxxx xxxxxxx angibt
systemctl status systemd-timesyncd
Wenn hier also zwei Dienste arbeiten, einen abschalten/deaktivieren und dann den gewünschten passend konfigurieren.
Member: Inf1d3l
Inf1d3l Dec 16, 2020 at 11:23:49 (UTC)
Goto Top
Hi,

systemctl status systemd-timesyncd ==> inactive (dead)
timedatectl ==> inactive

in der /etc/systemd/timesyncd.conf ist nichts angegeben.
Member: Der-Phil
Solution Der-Phil Dec 16, 2020 at 11:27:29 (UTC)
Goto Top
Hallo!

Zeig doch mal die ntp.conf und mach ein ps aux | grep ntp
Member: Inf1d3l
Inf1d3l Dec 16, 2020 updated at 11:34:10 (UTC)
Goto Top
ntp.conf:

driftfile /var/lib/ntp/ntp.drift

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable

server 10.10.10.1
server 10.10.10.2
server 10.10.10.3

restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

restrict 127.0.0.1
restrict ::1

root@vm:~# ps aux | grep ntp
ntp        987  0.0  0.1  76656  3776 ?        Ssl  Dez14   0:11 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 108:115
root      3329  0.0  0.0   6088   828 pts/0    S+   12:32   0:00 grep ntp
Member: Inf1d3l
Inf1d3l Dec 16, 2020 updated at 11:44:39 (UTC)
Goto Top
Entschuldigung, ich habe ntpq -p komplett falsch interpretiert. Es ist alles korrekt. Habe remote und refid falsch gelesen/gedeutet. Sorry! face-smile
Member: tagol01
Solution tagol01 Dec 16, 2020, updated at Jan 27, 2021 at 13:40:55 (UTC)
Goto Top
Hallo

was sagt: ntpq -pn

Bitte ausgabe Posten

Debug aktiviert?
Mitglied: 146707
146707 Dec 16, 2020 updated at 11:48:54 (UTC)
Goto Top
Dez 14 14:17:37 vm ntpd[987]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Dez 14 14:17:37 vm ntpd[987]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
Diese Meldungen sind übrigens normal und kann man ignorieren, sie sagen nur das zum Zeitpunkt des Dienststarts noch nicht synchronisiert wurde.
Entschuldigung, ich habe ntpq -p komplett falsch interpretiert. Es ist alles korrekt. Habe remote und refid falsch gelesen/gedeutet. Sorry!
Na dann mal wieder die Brille schuld ...