I wish to configure Time Synchronisation on Ubuntu 16.04.4 but timedatectl give Failed to create bus connection: No such file or directory
18,300
Solution 1
I found the solution here: Thanks for the answer but I found the solution here: https://stackoverflow.com/questions/43907925/ubuntu-timedatectl-fails-in-docker-container
On a minimal Ubuntu 16.04 installation (like mine) the dbus package is not installed. So apt-get install dbus
resolved the problem.
Solution 2
timedatectl
trys to open serveral files/devies. One of them fails in your case. Start the timedatectl
with strace
and search for error messages:
$ strace -o /tmp/timedatectl.log timedatectl status
$ grep "^open(" /tmp/timedatectl.log
...
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
open("/dev/rtc", O_RDONLY|O_CLOEXEC) = 4
open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 4
...
If you know which file/device creates the problem you can start fixing it.
Related videos on Youtube
Author by
Eric Baplue
Updated on September 18, 2022Comments
-
Eric Baplue over 1 year
When I look at https://help.ubuntu.com/lts/serverguide/NTP.html I can see the current time configuration with timedatectl but I always get an error.
$ timedatectl status Failed to create bus connection: No such file or directory $ sudo timedatectl status Failed to create bus connection: No such file or directory # timedatectl status Failed to create bus connection: No such file or directory
There are no ntp packages installed and the service is running normal.
# systemctl status systemd-timesyncd * systemd-timesyncd.service - Network Time Synchronization Loaded: loaded (/lib/systemd/system/systemd-timesyncd.service; enabled; vendor preset: enabled) Drop-In: /lib/systemd/system/systemd-timesyncd.service.d `-disable-with-time-daemon.conf Active: active (running) since Thu 2018-03-15 15:37:16 CET; 17h ago Docs: man:systemd-timesyncd.service(8) Main PID: 1801 (systemd-timesyn) Status: "Synchronized to time server 193.190.253.212:123 (1.be.pool.ntp.org)." CGroup: /system.slice/systemd-timesyncd.service `-1801 /lib/systemd/systemd-timesyncd Mar 15 15:37:16 linux-repo systemd[1]: Starting Network Time Synchronization... Mar 15 15:37:16 linux-repo systemd[1]: Started Network Time Synchronization. Mar 15 15:37:21 linux-repo systemd-timesyncd[1801]: Synchronized to time server 193.190.253.212:123 (1.be.pool.ntp.org). Mar 16 08:28:56 linux-repo systemd[1]: Started Network Time Synchronization.
-
simlev over 5 yearsPlease accept one of the answers, to mark your question as closed.