Bug#1078126: Unable to run «timedatectl» (missing d-bus dependency?)
Camaleón
noelamac at gmail.com
Wed Aug 7 12:24:34 BST 2024
El 2024-08-07 a las 11:13 +0200, Michael Prokop escribió:
> * Camaleón [Wed Aug 07, 2024 at 10:57:52AM +0200]:
>
> > After installing «systemd-timesyncd», when I run timedatectl (either as root or
> > plain user) I get an error and command is not run:
> >
> > root at noc11:~# timedatectl status
> > Failed to connect to bus: No such file or directory
> >
> > This is a barebone/headless server (no X, no UI), maybe a missing
> > dependency (d-bus?) that is not pulled to be installed but should be.
> >
> > root at noc11:~# dpkg -l | grep -e dbus -e systemd
> > ii libdbus-1-3:amd64 1.14.10-1~deb12u1 amd64 simple interprocess messaging system (library)
> > ii libsystemd-shared:amd64 252.26-1~deb12u2 amd64 systemd shared private library
> > ii libsystemd0:amd64 252.26-1~deb12u2 amd64 systemd utility library
> > ii systemd 252.26-1~deb12u2 amd64 system and service manager
> > ii systemd-sysv 252.26-1~deb12u2 amd64 system and service manager - SysV compatibility symlinks
> > ii systemd-timesyncd 252.26-1~deb12u2 amd64 minimalistic service to synchronize local time with NTP servers
>
> systemd-timesyncd depends on systemd, which further has dbus in
> recommends via:
>
> Recommends: default-dbus-system-bus | dbus-system-bus, systemd-timesyncd | time-daemon
>
> So it looks like you have recommends disabled on your system.
Sure, it's a must for a clean system :-)
> If you're doing this you're leaving the defaults and need
> to handle this on your own, also see
> https://www.debian.org/doc/debian-policy/ch-relationships.html#binary-dependencies-depends-recommends-suggests-enhances-pre-depends
I would either consider:
1. Setting dbus or dbus-broker as (dep)endency for systemd; or
2. Setting dbus or dbus-broker as (rec)ommended for systemd-timesyncd.
> (Closing the bug report, as it's not a bug in systemd / systemd-timesyncd.)
Fair enough.
After installing dbus AND starting dbus daemon, the order is run as
expected:
root at noc11:~# apt install dbus
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias... Hecho
Leyendo la información de estado... Hecho
Se instalarán los siguientes paquetes adicionales:
dbus-bin dbus-daemon dbus-session-bus-common dbus-system-bus-common
Paquetes sugeridos:
default-dbus-session-bus | dbus-session-bus
Se instalarán los siguientes paquetes NUEVOS:
dbus dbus-bin dbus-daemon dbus-session-bus-common
dbus-system-bus-common
0 actualizados, 5 nuevos se instalarán, 0 para eliminar y 0 no
actualizados.
Se necesita descargar 544 kB de archivos.
Se utilizarán 1.020 kB de espacio de disco adicional después de esta
operación.
¿Desea continuar? [S/n] s
(...)
root at noc11:~# systemctl start dbus
root at noc11:~# timedatectl status
Local time: mié 2024-08-07 13:00:18 CEST
Universal time: mié 2024-08-07 11:00:18 UTC
RTC time: mié 2024-08-07 11:00:18
Time zone: Europe/Madrid (CEST, +0200)
System clock synchronized: yes
NTP service: active
RTC in local TZ: no
Cheers,
--
Camaleón
More information about the Pkg-systemd-maintainers
mailing list