NTP not working

Started by lpwevers, August 31, 2019, 01:08:50 PM

Previous topic - Next topic
Hi,

For some reason NTP does not work on my OPNsense box. When I try to start it, it just immediately dies again. I'm using the default setup as shipped with OPNsense.

In /var/log/ntpd.log I get this:
Aug 31 13:06:33 OPNsense ntpd[60103]: ntpd 4.2.8p13@1.3847-o Mon Aug 26 00:49:49 UTC 2019 (1): Starting
Aug 31 13:06:33 OPNsense ntpd[60103]: Command line: /usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid
Aug 31 13:06:33 OPNsense ntpd[5695]: proto: precision = 0.227 usec (-22)
Aug 31 13:06:33 OPNsense ntpd[5695]: basedate set to 2019-08-14
Aug 31 13:06:33 OPNsense ntpd[5695]: gps base set to 2019-08-18 (week 2067)
Aug 31 13:06:33 OPNsense ntpd[5695]: restrict: 'monitor' cannot be disabled while 'limited' is enabled
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen and drop on 0 v6wildcard [::]:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen and drop on 1 v4wildcard 0.0.0.0:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen normally on 2 igb3 10.0.0.10:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen normally on 3 igb3 [fe80::4262:31ff:fe00:3a51%4]:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen normally on 4 igb3 [fdd0:609d:e6ae:0:4262:31ff:fe00:3a51]:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen normally on 5 igb3 [2001:980:5fb6:1:4262:31ff:fe00:3a51]:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen normally on 6 lo0 [::1]:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listen normally on 7 lo0 127.0.0.1:123
Aug 31 13:06:33 OPNsense ntpd[5695]: Listening on routing socket on fd #28 for interface updates
Aug 31 13:06:33 OPNsense ntpd[5695]: mlockall(): Cannot allocate memory
Aug 31 13:06:33 OPNsense ntpd[5695]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
Aug 31 13:06:33 OPNsense ntpd[5695]: 0.0.0.0 c01d 0d kern kernel time sync enabled
Aug 31 13:06:33 OPNsense ntpd[5695]: kernel reports TIME_ERROR: 0x4041: Clock Unsynchronized
Aug 31 13:06:33 OPNsense ntpd[5695]: 0.0.0.0 c012 02 freq_set kernel -12.274 PPM
Aug 31 13:06:33 OPNsense ntpd[5695]: 0.0.0.0 c016 06 restart
Aug 31 13:06:34 OPNsense ntpd[5695]: ntpd exiting on signal 15 (Terminated)
Aug 31 13:06:34 OPNsense ntpd[5695]: 0.0.0.0 c01d 0d kern kernel time sync disabled


Any suggestions on how to fix this?

September 22, 2019, 03:08:32 PM #1 Last Edit: September 22, 2019, 03:51:24 PM by thereaper
Same issue, seems like FreeBSD is not updating hardware clock with current system time, derived from ntpd:

# cat /var/log/ntpd.log

Sep 22 22:57:47 OPNsense ntpd[16798]: Listen normally on 4 lo0 [::1]:123
Sep 22 22:57:47 OPNsense ntpd[16798]: Listen normally on 5 lo0 127.0.0.1:123
Sep 22 22:57:47 OPNsense ntpd[16798]: Listening on routing socket on fd #26 for interface updates
Sep 22 22:57:47 OPNsense ntpd[16798]: mlockall(): Cannot allocate memory
Sep 22 22:57:47 OPNsense ntpd[16798]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized
Sep 22 22:57:47 OPNsense ntpd[16798]: kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized

is last entries, no new log entries after that. Also:

# dmesg | grep rtc
atrtc0: <AT realtime clock> port 0x70-0x77 on acpi0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207677
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207419