OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: spetrillo on July 29, 2021, 09:25:28 pm

Title: NTP Time Error??
Post by: spetrillo on July 29, 2021, 09:25:28 pm
Hello all,

Should I be worried about these in my NTP log:

2021-07-29T15:11:56   ntpd[49850]   kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized   
2021-07-29T15:11:56   ntpd[49850]   kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized

Time on my firewall is good, so not sure where this is coming from?

Thanks,
Steve
Title: Re: NTP Time Error??
Post by: Dysprosium11 on July 29, 2021, 10:20:14 pm
After i upgraded everything works fine except the NTP deamon,
the error in the log when i want to start the service is

/status_services.php: The command '/usr/local/sbin/ntpd -g -c '/var/etc/ntpd.conf' -p '/var/run/ntpd.pid'' returned exit code '1', the output was ''

2021-07-29T22:27:57   ntpd[61606]   daemon child exited with code 1   
2021-07-29T22:27:57   ntpd[64692]   unable to bind to wildcard address :: - another process may be running - EXITING   
2021-07-29T22:27:57   ntpd[64692]   restrict: 'monitor' cannot be disabled while 'limited' is enabled   
2021-07-29T22:27:57   ntpd[64692]   gps base set to 2021-07-11 (week 2166)   
2021-07-29T22:27:57   ntpd[64692]   basedate set to 2021-07-10   
2021-07-29T22:27:57   ntpd[64692]   proto: precision = 0.135 usec (-23)   
2021-07-29T22:27:57   ntpd[61606]   ----------------------------------------------------   
2021-07-29T22:27:57   ntpd[61606]   available at https://www.nwtime.org/support   
2021-07-29T22:27:57   ntpd[61606]   corporation. Support and training for ntp-4 are   
2021-07-29T22:27:57   ntpd[61606]   Inc. (NTF), a non-profit 501(c)(3) public-benefit   
2021-07-29T22:27:57   ntpd[61606]   ntp-4 is maintained by Network Time Foundation,   
2021-07-29T22:27:57   ntpd[61606]   ----------------------------------------------------   
2021-07-29T22:27:57   ntpd[61606]   Command line: /usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid   
2021-07-29T22:27:57   ntpd[61606]   ntpd 4.2.8p15@1.3728-o Thu Jul 22 12:42:44 UTC 2021 (1): Starting

okay a reboot fixed it :)
Title: Re: NTP Time Error??
Post by: Christophe999s on July 29, 2021, 10:40:06 pm
Are you running in a vm?
I get the Clock Unsynchronized message on reboot, but I have opnsense running in proxmox.
After that the message doesn’t appear anymore, everything stays synched.
My opnsense ntp syncs with 127.127.1.0, and the time is set by the proxmox host running chrony.
Title: Re: NTP Time Error??
Post by: pouakai on July 30, 2021, 06:59:08 am

2021-07-29T15:11:56   ntpd[49850]   kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized   
2021-07-29T15:11:56   ntpd[49850]   kernel reports TIME_ERROR: 0x2041: Clock Unsynchronized


What this is really saying is that in the first few seconds (minutes?) after booting up the clock is unsynchronised.  After that the clock becomes synchronised and the message stops.

You can search for this in the forums - it has been confusing people for a while.  It would be good if the 'error' message was phrased better, but it is from ntp and not Opnsense.