OPNsense Forum

Archive => 21.7 Legacy Series => Topic started by: tudou on August 15, 2021, 02:00:44 am

Title: ntpdNetwork Time Daemon :error
Post by: tudou on August 15, 2021, 02:00:44 am
Versions   
OPNsense 21.7.1-amd64
FreeBSD 12.1-RELEASE-p19-HBSD
OpenSSL 1.1.1k 25 Mar 2021

ntpd   Network Time Daemon


2021-08-15T06:41:00   ntpd[93468]   daemon child exited with code 1   
2021-08-15T06:41:00   ntpd[18732]   unable to bind to wildcard address :: - another process may be running - EXITING   
2021-08-15T06:41:00   ntpd[18732]   restrict: 'monitor' cannot be disabled while 'limited' is enabled   
2021-08-15T06:41:00   ntpd[18732]   gps base set to 2021-07-25 (week 2168)   
2021-08-15T06:41:00   ntpd[18732]   basedate set to 2021-07-22   
2021-08-15T06:41:00   ntpd[18732]   proto: precision = 0.153 usec (-23)   
2021-08-15T06:41:00   ntpd[93468]   ----------------------------------------------------   
2021-08-15T06:41:00   ntpd[93468]   available at https://www.nwtime.org/support   
2021-08-15T06:41:00   ntpd[93468]   corporation. Support and training for ntp-4 are   
2021-08-15T06:41:00   ntpd[93468]   Inc. (NTF), a non-profit 501(c)(3) public-benefit   
2021-08-15T06:41:00   ntpd[93468]   ntp-4 is maintained by Network Time Foundation,   
2021-08-15T06:41:00   ntpd[93468]   ----------------------------------------------------   
2021-08-15T06:41:00   ntpd[93468]   Command line: /usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid   
2021-08-15T06:41:00   ntpd[93468]   ntpd 4.2.8p15@1.3728-o Tue Aug 3 09:54:13 UTC 2021 (1): Starting   
2021-08-15T06:40:28   ntpd[13032]   daemon child exited with code 1   
2021-08-15T06:40:28   ntpd[34945]   unable to bind to wildcard address :: - another process may be running - EXITING   
2021-08-15T06:40:28   ntpd[34945]   restrict: 'monitor' cannot be disabled while 'limited' is enabled   
2021-08-15T06:40:28   ntpd[34945]   gps base set to 2021-07-25 (week 2168)   
2021-08-15T06:40:28   ntpd[34945]   basedate set to 2021-07-22   
2021-08-15T06:40:28   ntpd[34945]   proto: precision = 0.123 usec (-23)
Title: Re: ntpdNetwork Time Daemon :error
Post by: tokade on August 20, 2021, 11:57:27 am
I've got a similar issue. After rebooting my opnsense ntpd doesnt't start. I find the same messages in the log file. Starting ntpd via GUI doesn't work. Only stopping from CLI helps to start it again (CLI and GUI).
Title: Re: ntpdNetwork Time Daemon :error
Post by: franco on August 20, 2021, 01:00:52 pm
Without more info we just have to trust this assessment:

> unable to bind to wildcard address :: - another process may be running -


Cheers,
Franco
Title: Re: ntpdNetwork Time Daemon :error
Post by: tokade on August 20, 2021, 01:21:12 pm
In my case I can confirm that after rebooting there is a ntpd process running, but the GUI states it is not running. Only the manuall kill of the process and starting it again helps. This happens only with 21.7.1.
Or is it problem with the wildcard address :: ? May ntopd is started to early while booting?

Regards
Torsten
Title: Re: ntpdNetwork Time Daemon :error
Post by: franco on August 20, 2021, 01:38:30 pm
I'm assuming wildcard address port 123. So

# pgrep ntpd

yields a PID, but

# cat /var/run/ntpd.pid

is not the same?


Cheers,
Franco
Title: Re: ntpdNetwork Time Daemon :error
Post by: tokade on August 20, 2021, 01:40:22 pm
Attached the log from this morning, after reboot till manually kill and start ntpd.
Title: Re: ntpdNetwork Time Daemon :error
Post by: talopensense on August 22, 2021, 10:57:46 pm
I'm assuming wildcard address port 123. So

# pgrep ntpd

yields a PID, but

# cat /var/run/ntpd.pid

is not the same?


Cheers,
Franco

This is correct and I am reporting the exact same behaviour since I am on the 21.7.1 as well and noticed that issue recently.

Code: [Select]
root@opn1:~ # pgrep ntpd
70102
root@opn1:~ # cat /var/run/ntpd.pid
64059
root@opn1:

I killed ntpd and removed the ntpd.pid file in /var/run folder which let the ntp service restart from the UI.

Is there any indication of what could have caused that issue?
Title: Re: ntpdNetwork Time Daemon :error
Post by: Benqer on August 26, 2021, 12:13:53 am
I have exact the same issu.
 
> unable to bind to wildcard address :: - another process may be running -


differend PIDs
Title: Re: ntpdNetwork Time Daemon :error
Post by: kosta on September 25, 2021, 10:14:02 am
I have the same issue since upgrading to 21.7.3 ( and _1).
What do I do to fix this? (if possible, with commands please)
Title: Re: ntpdNetwork Time Daemon :error
Post by: Koldnitz on September 25, 2021, 07:47:40 pm
This was happening to me at reboot for 3 or 4 reboots.

I would run these commands from a secure shell connection:

sudo pgrep ntpd

Then I would kill the NTPD:

sudo kill thePIDreceivedabovefromPGREP

Next I would delete /var/run/ntpd.pid:

sudo rm /var/run/ntpd.pid

Doing these do things commands allowed me to restart NTPD (Network Time).

Last time this happened I went into the NTPD service (Services:Network Time: General) from the GUI and enabled:

Client mode - Quit NTP server immediately after time synchronisation checkbox. 

I then restarted the service and finally disabled the client mode checkbox.  My NTPD service restarted fine last time rebooted (after last update, 2 or 3 days ago).

However I just noticed it was still set to Quit NTP server after sync so I unchecked that checkbox again and resaved / resynced my NTPD (I started and stopped it twice)

Your mileage may vary but it cannot hurt to try.

Cheers,
Title: Re: ntpdNetwork Time Daemon :error
Post by: kosta on September 26, 2021, 05:39:01 am
Thank you!! That worked perfectly. It was enough to stop the service and delete the ntpd.pid.
Title: Re: ntpdNetwork Time Daemon :error
Post by: zz00mm on October 27, 2021, 07:55:31 pm
Have been having this same issue, just updated to 21.7.4 and this issue still exists. After reboot pgrep ntpd shows different pid then /var/run/ntpd.pid. execute killall ntpd and the service can be started from the GUI and shows running.
Title: Re: ntpdNetwork Time Daemon :error
Post by: benyamin on October 28, 2021, 02:08:16 pm
From @tokade's log, it certainly appears that two ntpd processes were running:

Code: [Select]
2021-08-20T07:04:37 ntpd[80081] ntpd 4.2.8p15@1.3728-o Thu Jul 22 12:42:44 UTC 2021 (1): Starting
2021-08-20T07:04:37 ntpd[85812] ntpd 4.2.8p15@1.3728-o Thu Jul 22 12:42:44 UTC 2021 (1): Starting

Perhaps try reinstalling the ntp package at Firmware: System > Packages. I presume only one such package is listed.

IIRC, ntpd is not launched in typical HARDENEDBSD fashion (/etc/rc.conf) on OPNsense. A dev might be able to comment on why additional processes might be launched - and more importantly: where to check.