FS#35941 - ntpdate and ntpd interfere with each other on startup

Attached to Project: Arch Linux
Opened by Dirk Heinrichs (heini) - Wednesday, 26 June 2013, 16:11 GMT
Last edited by Dave Reisner (falconindy) - Wednesday, 26 June 2013, 17:28 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: When both ntpdate.service and ntpd.service are enabled, they interfere with each other on system boot, with the result that ntpd.service doesn't start. The usual procedure is to start ntpdate.service, wait until it's finished, then start ntpd.service.


Additional info:
* extra/ntp 4.2.6.p5-14

From the log:
Jun 26 19:23:34 gondor ntpd[329]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Jun 26 19:23:34 gondor ntpd[342]: unable to bind to wildcard address 0.0.0.0 - another process may be running - EXITING

This "another process" is ntpd started via ntpdate.service, which hasn't finished setting the clock, yet.

Steps to reproduce:

systemctl enable ntpdate.service
systemctl enable ntpd.service
reboot
This task depends upon

Closed by  Dave Reisner (falconindy)
Wednesday, 26 June 2013, 17:28 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Invalid -- ntpd sets the time on startup
Comment by Dave Reisner (falconindy) - Wednesday, 26 June 2013, 16:35 GMT
Yeah... The solution is: don't do this. Why do you need both?
Comment by Dirk Heinrichs (heini) - Wednesday, 26 June 2013, 16:42 GMT
No, that's not the solution. It works fine on other distributions. Just tell ntpd.service to start after ntpdate.service.
Why it's needed? Dual boot system with Windows. First ntpdate.service sets the correct time, then ntpd.service ensures it stays correct. That's what ntpdate (or ntpd -q) is all about.
Comment by Dave Reisner (falconindy) - Wednesday, 26 June 2013, 16:45 GMT
But ntpd sets the time on startup... We even pass the -g flag to allow for large corrections.
Comment by Dirk Heinrichs (heini) - Wednesday, 26 June 2013, 16:54 GMT
Ah, ok. Wasn't aware of this.

Loading...