The Masterserver can’t provide the time anymore.
How can I fix this?
Thanks a lot,
meg
meg@ucs:~$ sntp -d ucs
sntp 4.2.8p10@1.3728-o Sun Feb 25 21:22:25 UTC 2018 (1)
kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory
handle_lookup(ucs,0x2)
move_fd: estimated max descriptors: 32768, initial socket boundary: 16
sntp sendpkt: Sending packet to ucs:123 ...
Packet sent.
sock_cb: ucs.rent24.com ucs:123
sock_cb: Stratum unspecified, going to check for KOD (stratum: 0)
sock_cb: Packet refid: INIT
sock_cb: ucs not in sync, skipping this server
sock_cb: handle_pkt() returned -1
ggf noch relevant:
meg@ucs:~$ sudo ucr get timeserver
de.pool.ntp.org
meg@ucs:~$ ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
10.0.10.2 .INIT. 16 u - 64 0 0.000 0.000 0.000
meg@ucs:~$ sntp -d 10.0.10.2
sntp 4.2.8p10@1.3728-o Sun Feb 25 21:22:25 UTC 2018 (1)
kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory
handle_lookup(10.0.10.2,0x2)
move_fd: estimated max descriptors: 32768, initial socket boundary: 16
sntp sendpkt: Sending packet to 10.0.10.2:123 ...
Packet sent.
10.0.10.2 no UCST response after 5 seconds
de.pool.ntp.org has address 85.214.38.116
de.pool.ntp.org has address 217.144.138.234
de.pool.ntp.org has address 185.207.104.70
de.pool.ntp.org has address 141.22.13.9
None.
The (wrong) ntp is set by DHCP (router ip - seems default settings when option 42 is not set). But afaik this should be overwritten with our settings!?
My general recommendation is never to use DHCP for obtaining the addresses of servers. Then you probably wouldn’t have this particular problem in the first place.
The DHCP client configuration file /etc/dhcp/dhclient.conf includes ntp-servers in its request clause. Maybe removing that will help. Note though that this file is generated from the template file /etc/univention/templates/files/etc/dhcp/dhclient.conf, therefore changes to /etc/dhcp/dhclient.conf won’t persist. You may have to change the template itself as there’s no UCR variable controlling those settings.
root@ucs:~# dhclient
File: /etc/resolv.conf
RTNETLINK answers: File exists
File: /etc/resolv.conf
root@ucs:~# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
LOCAL(0) .LOCL. 5 l 6 64 1 0.000 0.000 0.000
main.macht.org 192.53.103.108 2 u 5 64 1 27.864 -19762. 0.000
root@ucs:~# sntp -d localhost
sntp 4.2.8p10@1.3728-o Sun Feb 25 21:22:25 UTC 2018 (1)
kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory
handle_lookup(localhost,0x2)
move_fd: estimated max descriptors: 1024, initial socket boundary: 16
sntp sendpkt: Sending packet to [::1]:123 ...
Packet sent.
sock_cb: localhost [::1]:123
sock_cb: Stratum unspecified, going to check for KOD (stratum: 0)
sock_cb: Packet refid: INIT
sock_cb: ::1 not in sync, skipping this server
sock_cb: handle_pkt() returned -1
sntp sendpkt: Sending packet to 127.0.0.1:123 ...
Packet sent.
sock_cb: localhost 127.0.0.1:123
sock_cb: Stratum unspecified, going to check for KOD (stratum: 0)
sock_cb: Packet refid: INIT
sock_cb: 127.0.0.1 not in sync, skipping this server
sock_cb: handle_pkt() returned -1
Well, ntpq -p shows that the NTP server is running and has synced to an external machine from the de.pool.ntp.org pool. That’s what we want.
The fact is that your UCS server’s clock is simply way off at the moment (the offset column is in seconds, meaning the clock is off by roughly 5.5 hours). That’s why sntp won’t use the UCS server as a source.