|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0008719||CentOS-7||ntp||public||2015-05-19 20:24||2017-09-11 14:24|
|Target Version||Fixed in Version|
|Summary||0008719: ntpd is started before named, so name resolution is not available|
|Description||The unit file of ntpd.service is not specifiying any order for named, so in case one is using the localhost as resolver (i.e. running named as resolver), ntpd won't work, outputting a lot of errors due to missing name resolution:|
May 19 22:30:53 kvm2.babioch.de ntpd_intres: host name not found: 0.de.pool.ntp.org
May 19 22:30:53 kvm2.babioch.de ntpd_intres: host name not found: 1.de.pool.ntp.org
May 19 22:30:53 kvm2.babioch.de ntpd_intres: host name not found: 2.de.pool.ntp.org
May 19 22:30:53 kvm2.babioch.de ntpd_intres: host name not found: 3.de.pool.ntp.org
|Steps To Reproduce||Run named as local resolver, enable both named and ntpd.|
|Additional Information||This can be fixed easily by adding "named" to the After= section of ntpd.service. Not sure whether this is the best solution, since not everyone is running named locally.|
|Tags||No tags attached.|
I have the same problem. It appears that the network is not completely operational when the ntpd is starting.
Instead of 'named', can I suggest to set the 'After=' section as following:
After=syslog.target network.target ntpdate.service sntp.service
I agree with abegot's comment.
The issue is that ntpd.service doesn't depend explicitly on network.target, which it should, I think.
It depends on it, however, indirectly - via the ntpdate.service. Unfortunately ntpdate.service is disabled by default, which causes network.target to be ignored as a dependency.
So a workaround for the problem in this bug is to enable ntpdate.service. I've tested this - ntpd.service will be started after network.target.
|2015-05-19 20:24||johnpatcher||New Issue|
|2015-06-09 14:16||abegot||Note Added: 0023348|
|2017-09-11 14:24||mstefanov||Note Added: 0030036|