Troubleshooting timedatectl and hostnamectl failed to activate service: timed out

Mantas Mikulėnas grawity at gmail.com
Wed Dec 13 18:21:48 UTC 2023


Activation is not client-side, it's handled automatically by dbus-daemon –
which either spawns the service directly or starts it as a systemd service.

In this case, check whether your logs show systemd-hostnamed.service
attempting to start; either it fails to start (missing libraries?
Apparmor?) or dbus-daemon fails to contact systemd (pid1 crashed?).

On Wed, Dec 13, 2023, 19:45 Sean Caron <scaron at umich.edu> wrote:

> Hi everyone,
>
> I'm on Ubuntu 20.04 LTS, kernel version 5.4.0-163-generic, systemd 245
> (245.4-4ubuntu3.22).
>
> I have some systems where I am receiving the following error messages when
> people attempt to use timedatectl or hostnamectl:
>
>
> Failed to query server: Failed to activate service
> 'org.freedesktop.timedate1': timed out (service_start_timeout=25000ms)
>
> Failed to query system properties: Failed to activate service
> 'org.freedesktop.hostname1': timed out (service_start_timeout=25000ms)
>
>
> I tried setting SYSTEMD_LOG_LEVEL=debug and rerunning the commands and it
> didn't really give me anything useful for determining the root cause of the
> issue. Here's an example of that output for timedatectl status:
>
>
> Bus n/a: changing state UNSET → OPENING
> Bus n/a: changing state OPENING → AUTHENTICATING
> Bus n/a: changing state AUTHENTICATING → HELLO
> Sent message type=method_call sender=n/a destination=org.freedesktop.DBus
> path=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello
> cookie=1 reply_cookie=0 signature=n/a error-name=n/a error-message=n/a
> Got message type=method_return sender=org.freedesktop.DBus
> destination=:1.15318 path=n/a interface=n/a member=n/a cookie=1
> reply_cookie=1 signature=s error-name=n/a error-message=n/a
> Bus n/a: changing state HELLO → RUNNING
> Sent message type=method_call sender=n/a
> destination=org.freedesktop.timedate1 path=/org/freedesktop/timedate1
> interface=org.freedesktop.DBus.Properties member=GetAll cookie=2
> reply_cookie=0 signature=s error-name=n/a error-message=n/a
> Got message type=error sender=org.freedesktop.DBus destination=:1.15318
> path=n/a interface=n/a member=n/a cookie=3 reply_cookie=2 signature=s
> error-name=org.freedesktop.DBus.Error.TimedOut error-message=Failed to
> activate service 'org.freedesktop.timedate1': timed out
> (service_start_timeout=25000ms)
> Failed to query server: Failed to activate service
> 'org.freedesktop.timedate1': timed out (service_start_timeout=25000ms)
> Bus n/a: changing state RUNNING → CLOSED
>
>
> I read that sometimes these issues can be caused by filesystem permissions
> on subdirectories in /var such as /var/tmp or /var/lib/systemd but I
> checked these and compared against a working system and I don't see any
> obvious differences.
>
> I have tried using strace on timedatectl and hostnamectl to try and see
> what's hanging things up but that hasn't really provided any fruitful
> direction, either.
>
> I didn't really know this was occurring until an end user reported it to
> me so I don't necessarily know how long the issue has been occurring or
> have a change in mind that could have broken things. I'm not sure if the
> upgrade from Ubuntu 18 to Ubuntu 20 broke it, or if some security
> configuration broke it. Or perhaps there is a missing dependency package on
> the broken systems?
>
> Could anyone out there please provide a little bit more guidance on how I
> might troubleshoot this and determine the root cause of the issue? I
> really hate to bother folks here but I'm feeling stuck.
>
> Thank you!
>
> Sean
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20231213/45b0d8f8/attachment.htm>


More information about the systemd-devel mailing list