Bugzilla – Bug 734831
systemd: timedated can't work due to ntpd.service nonexistant
Last modified: 2012-03-14 16:44:30 UTC
timedated checks for "ntpd.service" and exits if it's not found. => 1. the init script is called 'ntp' so it needs to check for ntp.service 2. timedated won't work if ntp isn't installed at all due to 2. it should probably only disable ntp related features instead of failing right away.
ntp package is providing ntpd : /etc/init.d/ntp:# Provides: ntp ntpd xntpd and it is correctly "advertised" by systemd : systemctl status ntpd.service shows the same output as systemctl status ntp.service
well, then the reason is different but the effect is the same :) # dbus-send --system --print-reply --dest=org.freedesktop.timedate1 /org/freedesktop/timedate1 org.freedesktop.timedate1.SetTimezone string:Europe/Berlin boolean:false Error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus) /var/log/messages says Dec 5 14:32:33 foobar dbus[737]: [system] Successfully activated service 'org.freedesktop.timedate1' Dec 5 14:32:33 foobar systemd-timedated[2421]: Failed to issue method call: Access denied Dec 5 14:32:33 foobar systemd-timedated[2421]: Failed to determine whether NTP is enabled: Input/output error Dec 5 14:32:33 foobar systemd[1]: systemd-timedated.service: main process exited, code=exited, status=1 Dec 5 14:32:33 foobar systemd[1]: Unit systemd-timedated.service entered failed state.
Starting the unit only if PathExists=/var/lib/ntp may help..
*** Bug 737518 has been marked as a duplicate of this bug. ***
Add also maintainer of ntp ... hi Peter ;)
(In reply to comment #2) > Dec 5 14:32:33 foobar systemd-timedated[2421]: Failed to issue method call: > Access denied > Dec 5 14:32:33 foobar systemd-timedated[2421]: Failed to determine whether NTP > is enabled: Input/output error Apparently, this is the call that fails: m = dbus_message_new_method_call( "org.freedesktop.systemd1", "/org/freedesktop/systemd1", "org.freedesktop.systemd1.Manager", "GetUnitFileState"); (It's called with "ntpd.service" as argument) I also can't call that method from d-feet (in Factory).
Easy way to reproduce: systemctl is-enabled ntpd.service
is-enabled bug is another issue (I've reported it upstream, will be fixed) after discussing with upstream, GetUnitFileState will work only with .service file and not initscript (because it would imply calling chkconfig from either timedated or pid 1, which is not acceptable by upstream). We should provide a ntp.service which would shadow ntp initscript. I think this can only be fixed for Factory (not a good idea to do such big change for a maintenance update for 12.1).
closing for 12.1, we've released an update which doesn't enforce ntpd to use timedated.