root@opnsense:~ # sockstat -l | grep :123root ntpdate 77157 4 udp6 *:123 *:*root ntpdate 77157 5 udp4 *:123 *:*root@opnsense:~ # service ntpdate statusCannot 'status' ntpdate. Set ntpdate_enable to YES in /etc/rc.conf or use 'onestatus' instead of 'status'.root@opnsense:~ # service ntpdate onestatusntpdate is not running.
root 15508 0.0 0.1 1058416 3136 - Ss 12:58 0:00.01 /bin/sh /usr/local/etc/inc/plugins.inc.d/ntpd/ntpdate_sync_once.
in the end ntpdate finishes and ntpd starts properly without further need to handle it.
If it takes longer it indicates possible connectivity problems with ntpdate?
root@opnsense:~ # ntpdate -q pool.ntp.orgserver 64.225.34.103, stratum 2, offset 0.279882, delay 0.10892server 162.159.200.123, stratum 3, offset 0.290670, delay 0.04358server 209.50.63.74, stratum 4, offset 0.290167, delay 0.10580server 138.68.46.177, stratum 2, offset 0.288142, delay 0.1063529 Jul 07:30:11 ntpdate[23722]: adjust time server 138.68.46.177 offset 0.288142 sec
root@opnsense:~ # sockstat -l | grep :123root ntpdate 35153 4 udp6 *:123 *:*root ntpdate 35153 5 udp4 *:123 *:*root@opnsense:~ # sockstat -l | grep :123root@opnsense:~ # sockstat -l | grep :123root ntpdate 14746 4 udp6 *:123 *:*root ntpdate 14746 5 udp4 *:123 *:*root@opnsense:~ # sockstat -l | grep :123root ntpdate 31092 4 udp6 *:123 *:*root ntpdate 31092 5 udp4 *:123 *:*
root@opnsense:~ # clog /var/log/ntpd.log | grep attemptsJul 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.
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}???
root@opnsense:~ # sh -x /usr/local/etc/inc/plugins.inc.d/ntpd/ntpdate_sync_once.sh+ NOTSYNCED=true+ MAX_ATTEMPTS=3+ /bin/cat /conf/config.xml+ /usr/bin/grep timeservers+ /usr/bin/cut '-d>' -f2+ /usr/bin/cut '-d<' -f1+ SERVER='0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org'+ [ '0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org' '=' '' ]+ /bin/pkill -f ntpdate_sync_once.sh+ ATTEMPT=1+ [ true '=' true ]+ [ 1 -le 3 ]+ [ true ]+ /usr/bin/killall ntpdate+ /bin/pgrep ntpd+ [ 1 -eq 0 ]+ break+ sleep 1Terminated
root@opnsense:~ # killall ntpdateroot@opnsense:~ # sh -x /usr/local/etc/inc/plugins.inc.d/ntpd/ntpdate_sync_once.sh+ NOTSYNCED=true+ MAX_ATTEMPTS=3+ /bin/cat /conf/config.xml+ /usr/bin/cut '-d>' -f2+ /usr/bin/cut '-d<' -f1+ /usr/bin/grep timeservers+ SERVER='0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org'+ [ '0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org' '=' '' ]+ /bin/pkill -f ntpdate_sync_once.sh+ ATTEMPT=1+ [ true '=' true ]+ [ 1 -le 3 ]+ [ true ]+ /usr/bin/killall ntpdate+ /bin/pgrep ntpd+ [ 1 -eq 0 ]+ break+ sleep 1+ /usr/local/sbin/ntpdate -s -t 5 0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.orgTerminatedroot@opnsense:~ #
root@opnsense:~ # dmesg | grep -i faultroot@opnsense:~ #
root@opnsense:~ # dmesg | grep -i "core dumped"root@opnsense:~ #