Archive > 20.1 Legacy Series

ntpd both running and not running?

<< < (2/5) > >>

franco:
It should take 30 seconds. If it takes longer it indicates possible connectivity problems with ntpdate?


Cheers,
Franco

danb35:

--- Quote from: franco on July 29, 2020, 01:29:16 pm ---If it takes longer it indicates possible connectivity problems with ntpdate?

--- End quote ---
Don't know about that:

--- Code: ---root@opnsense:~ # ntpdate -q pool.ntp.org
server 64.225.34.103, stratum 2, offset 0.279882, delay 0.10892
server 162.159.200.123, stratum 3, offset 0.290670, delay 0.04358
server 209.50.63.74, stratum 4, offset 0.290167, delay 0.10580
server 138.68.46.177, stratum 2, offset 0.288142, delay 0.10635
29 Jul 07:30:11 ntpdate[23722]: adjust time server 138.68.46.177 offset 0.288142 sec

--- End code ---
But still, ntpdate processes keep starting:

--- Code: ---root@opnsense:~ # sockstat -l | grep :123
root     ntpdate    35153 4  udp6   *:123                 *:*
root     ntpdate    35153 5  udp4   *:123                 *:*
root@opnsense:~ # sockstat -l | grep :123
root@opnsense:~ # sockstat -l | grep :123
root     ntpdate    14746 4  udp6   *:123                 *:*
root     ntpdate    14746 5  udp4   *:123                 *:*
root@opnsense:~ # sockstat -l | grep :123
root     ntpdate    31092 4  udp6   *:123                 *:*
root     ntpdate    31092 5  udp4   *:123                 *:*

--- End code ---
I could, of course, try to reboot the system--but that sounds like an awfully Windows-y troubleshooting step.

franco:
Something in this loop isn't quite right then:

https://github.com/opnsense/core/blob/master/src/etc/inc/plugins.inc.d/ntpd/ntpdate_sync_once.sh#L13

Would be interested in the log:

# clog /var/log/ntpd.log | grep attempts


Cheers,
Franco

danb35:

--- Code: ---root@opnsense:~ # clog /var/log/ntpd.log | grep attempts
Jul 21 16:11:25 opnsense ntp: Giving up on time sync after 3 attempts.
Jul 21 17:28:14 opnsense ntp: Successfully synced time after 1 attempts.
Jul 21 17:36:33 opnsense ntp: Successfully synced time after 1 attempts.
Jul 21 17:38:57 opnsense ntp: Successfully synced time after 1 attempts.
Jul 21 17:41:13 opnsense ntp: Successfully synced time after 1 attempts.
Jul 21 18:50:34 opnsense ntp: Successfully synced time after 1 attempts.
Jul 21 18:52:43 opnsense ntp: Successfully synced time after 1 attempts.

--- End code ---

It's probably noteworthy, though, that there's nothing at all in ntpd.log since 24 July:

--- Code: ---Jul 23 10:38:29 opnsense ntpdate[33552]: 2001:470:88f6:: rate limit response from server.
Jul 23 10:38:39 opnsense ntpdate[33552]: 2001:19f0:5:daf::2 rate limit response from server.
Jul 23 13:19:38 opnsense ntpdate[89457]: 12.167.151.1 rate limit response from server.
Jul 23 14:36:34 opnsense ntpdate[56908]: 64.225.34.103 rate limit response from server.
Jul 24 01:08:58 opnsense ntpdate[71733]: 142.147.92.5 rate limit response from server.
Jul 24 04:17:43 opnsense ntpdate[73287]: 206.55.191.142 rate limit response from server.
Jul 24 05:09:01 opnsense ntpdate[24693]: 64.142.54.12 rate limit response from server.
Jul 24 06:50:46 opnsense ntpdate[47278]: 192.111.144.114 rate limit response from server.
Jul 24 06:50:56 opnsense ntpdate[6556]: 192.111.144.114 rate limit response from server.
CLOG}???

--- End code ---

franco:
Ok, let's see what's wrong...

# sh -x /usr/local/etc/inc/plugins.inc.d/ntpd/ntpdate_sync_once.sh

The script isn't handling ntpdate being stuck very well. Might be enough to run the following to confirm:

# killall ntpdate


Cheers,
Franco

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version