Article 6NDE0 Slackware 15.0 distro ntpd will not start consistently after reboot

Slackware 15.0 distro ntpd will not start consistently after reboot

by
rocknrobin
from LinuxQuestions.org on (#6NDE0)
Hello again. I recently did updates on my Slackware 15.0+ distro and noticed that the ntp daemon was not starting after reboot. I could manually start it after reboot and waiting a few minutes with :
/etc/rc.d/rc.ntpd start

I checked the log entries. Before the last ntp update for 64-current the log would reflect this upon reboot:

Code:
3 Jun 04:40:04 ntpd[4154]: initial drift restored to 13.538300
3 Jun 04:40:04 ntpd[4154]: Listen and drop on 0 v6wildcard [::]:123
3 Jun 04:40:04 ntpd[4154]: Listen and drop on 1 v4wildcard 0.0.0.0:123
3 Jun 04:40:04 ntpd[4154]: Listen normally on 2 lo 127.0.0.1:123
3 Jun 04:40:04 ntpd[4154]: Listen normally on 3 eth0 10.160.134.65:123
3 Jun 04:40:04 ntpd[4154]: Listen normally on 4 eth1 10.160.160.15:123
3 Jun 04:40:04 ntpd[4154]: Listen normally on 5 lo [::1]:123
3 Jun 04:40:04 ntpd[4154]: Listen normally on 6 eth0 [fe80::9a90:96ff:fec5:3b5e%2]:123
3 Jun 04:40:04 ntpd[4154]: Listen normally on 7 eth1 [fe80::a26:aeff:fe3c:2217%3]:123
3 Jun 04:40:04 ntpd[4154]: Listening on routing socket on fd #24 for interface updates
3 Jun 04:40:04 ntpd[4154]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
3 Jun 04:40:04 ntpd[4154]: kernel reports TIME_ERROR: 0x2041: Clock UnsynchronizedNote...Even though the last two entries show clock unsynchronized the network timing protocol was working. I could evoke the command

ntpq -p

and see the peers and the one it was synched to.

After the update however this is what the log reflected after reboot.

Code:
8 Jun 16:31:18 ntpd[1206]: initial drift restored to 14.560181
8 Jun 16:31:18 ntpd[1206]: Listen and drop on 0 v6wildcard [::]:123
8 Jun 16:31:18 ntpd[1206]: Listen and drop on 1 v4wildcard 0.0.0.0:123
8 Jun 16:31:18 ntpd[1206]: Listen normally on 2 lo 127.0.0.1:123
8 Jun 16:31:18 ntpd[1206]: Listen normally on 3 eth1 10.160.160.15:123
8 Jun 16:31:18 ntpd[1206]: Listen normally on 4 lo [::1]:123
8 Jun 16:31:18 ntpd[1206]: bind(21) AF_INET6 [fe80::a26:aeff:fe3c:2217%3]:123 flags 0x811 failed: Cannot assign requested address
8 Jun 16:31:18 ntpd[1206]: unable to create socket on eth1 (5) for [fe80::a26:aeff:fe3c:2217%3]:123Then when I tried to invoke any ntpq command I got connection refused.

If I wait a few minutes I can start the ntpd with /etc/rc.d/rc.ntpd start and it will start running:

Code:
8 Jun 16:38:35 ntpd[1838]: initial drift restored to 14.560181
8 Jun 16:38:35 ntpd[1838]: Listen and drop on 0 v6wildcard [::]:123
8 Jun 16:38:35 ntpd[1838]: Listen and drop on 1 v4wildcard 0.0.0.0:123
8 Jun 16:38:35 ntpd[1838]: Listen normally on 2 lo 127.0.0.1:123
8 Jun 16:38:35 ntpd[1838]: Listen normally on 3 eth0 10.160.134.65:123
8 Jun 16:38:35 ntpd[1838]: Listen normally on 4 eth1 10.160.160.15:123
8 Jun 16:38:35 ntpd[1838]: Listen normally on 5 lo [::1]:123
8 Jun 16:38:35 ntpd[1838]: Listen normally on 6 eth0 [fe80::9a90:96ff:fec5:3b5e%2]:123
8 Jun 16:38:35 ntpd[1838]: Listen normally on 7 eth1 [fe80::a26:aeff:fe3c:2217%3]:123
8 Jun 16:38:35 ntpd[1838]: Listening on routing socket on fd #24 for interface updates
8 Jun 16:38:35 ntpd[1838]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
8 Jun 16:38:35 ntpd[1838]: kernel reports TIME_ERROR: 0x41: Clock UnsynchronizedI then added /etc/rc.d/rc.ntpd start to my rc.local file and it would only start after reboot inconsistently. The only way I could get the ntpd to start reliably was as I mentioned, wait a few minutes and start the ntp daemon manually. Here are the log entries with the ntp daemon start command added to rc.local when it works.

Code:
8 Jun 16:20:34 ntpd[1400]: initial drift restored to 43.568237
8 Jun 16:20:34 ntpd[1400]: Listen and drop on 0 v6wildcard [::]:123
8 Jun 16:20:34 ntpd[1400]: Listen and drop on 1 v4wildcard 0.0.0.0:123
8 Jun 16:20:34 ntpd[1400]: Listen normally on 2 lo 127.0.0.1:123
8 Jun 16:20:34 ntpd[1400]: Listen normally on 3 eth1 10.160.160.10:123
8 Jun 16:20:34 ntpd[1400]: Listen normally on 4 lo [::1]:123
8 Jun 16:20:34 ntpd[1400]: bind(21) AF_INET6 [fe80::fae4:3bff:fe5a:b0a1%3]:123 flags 0x811 failed: Cannot assign requested address
8 Jun 16:20:34 ntpd[1400]: unable to create socket on eth1 (5) for [fe80::fae4:3bff:fe5a:b0a1%3]:123
8 Jun 16:20:36 ntpd[1796]: initial drift restored to 43.568237
8 Jun 16:20:36 ntpd[1796]: Listen and drop on 0 v6wildcard [::]:123
8 Jun 16:20:36 ntpd[1796]: Listen and drop on 1 v4wildcard 0.0.0.0:123
8 Jun 16:20:36 ntpd[1796]: Listen normally on 2 lo 127.0.0.1:123
8 Jun 16:20:36 ntpd[1796]: Listen normally on 3 eth1 10.160.160.10:123
8 Jun 16:20:36 ntpd[1796]: Listen normally on 4 lo [::1]:123
8 Jun 16:20:36 ntpd[1796]: Listen normally on 5 eth1 [fe80::fae4:3bff:fe5a:b0a1%3]:123
8 Jun 16:20:36 ntpd[1796]: Listening on routing socket on fd #22 for interface updates
8 Jun 16:20:36 ntpd[1796]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
8 Jun 16:20:36 ntpd[1796]: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
8 Jun 16:20:40 ntpd[1796]: Listen normally on 6 eth0 10.160.134.60:123
8 Jun 16:20:40 ntpd[1796]: Listen normally on 7 eth0 [fe80::da5e:d3ff:fe82:4915%2]:123
8 Jun 16:20:40 ntpd[1796]: 51.81.209.232 local addr 10.160.160.10 -> 10.160.134.60
8 Jun 16:20:40 ntpd[1796]: 23.157.160.168 local addr 10.160.160.10 -> 10.160.134.60
8 Jun 16:20:40 ntpd[1796]: 5.78.62.36 local addr 10.160.160.10 -> 10.160.134.60
8 Jun 16:20:40 ntpd[1796]: 71.19.144.140 local addr 10.160.160.10 -> 10.160.134.60
8 Jun 16:20:40 ntpd[1796]: new interface(s) found: waking up resolverAs can be seen the initial start of ntpd fails with the socket error and then after starting in rc.local it successfully starts with the entries for peers.


Additional info...I have another Slackware 15.0 image running that only has the ETH0 interface and ntp starts up fine every time with that one. On the one with two Ethernet interfaces ETH1 is behind a point to point VPN which for all practical purposes does not have any Internet access on the far end so it can't receive timing updates on that interface.

Is there a configuration I am missing or is there a way to configure which interface is used for the timing updates? Thanks in advance.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments