2

When I restart a particular computer there is an error message,

 # init 6
 Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)

I found out that this is caused by the dbus service. I can cause the error message to appear by

 # systemctl stop dbus.service
 Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)

This was all done in a root shell, naturally.

Does anyone know what this means, and how to fix it? I find that d-bus seems to be little documented (or too complicated for me, or both).

The machine is running CentOS Linux release 7.2.1511 and is up to date.

2 Answers 2

3

For me it happened after RHEL 7.4 -> 7.5 upgrade. Dbus socket got moved to /run/dbus/system_bus_socket. Even though systemd clearly points to /run/dbus/system_bus_socket it's still wants to connect via /var/run/dbus/system_bus_socket:

[root@ipsystem]# systemctl restart systemd-logind.service
Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)

Notice it's connecting to /run/dbus/ socket:

[root@ip-10-0-254-241 system]# lsof -p `pidof systemd`|grep socket
systemd   1 root   14u     unix 0xffff9385a4507c00      0t0      54528 socket
systemd   1 root   19u     unix 0xffff9385c8411400      0t0      69828 /run/dbus/system_bus_socket
systemd   1 root   21u     unix 0xffff9385c8412800      0t0      78276 socket
systemd   1 root   52u     unix 0xffff9384f1b3bc00      0t0      13426 /run/lvm/lvmpolld.socket
systemd   1 root   71u     unix 0xffff9384f40de000      0t0       9631 /run/systemd/journal/socket
systemd   1 root   75u     unix 0xffff9384f1b28c00      0t0      12918 /run/lvm/lvmetad.socket
[root@ipsystem]# mv /var/run/dbus/system_bus_socket /var/run/dbus/system_bus_socket.old
[root@ipsystem]# systemctl restart dbus NetworkManager
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
[root@ipsystem]# ls -l /var/run/dbus/system_bus_socket
ls: cannot access /var/run/dbus/system_bus_socket: No such file or directory

Clearly still looking for /var/run/dbus/system_bus_socket.

Link /var/run/dbus/system_bus_socket to /run/dbus/system_bus_socket:

[root@ipsystem]# ln -s /run/dbus/system_bus_socket /var/run/dbus/system_bus_socket```

Now working as expected:

[root@ipsystem]# systemctl restart dbus systemd-logind 
[root@ipsystem]# systemctl status dbus systemd-logind
● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/usr/lib/systemd/system/dbus.service; static; vendor preset: disabled)
   Active: active (running) since Mon 2018-04-16 15:07:38 UTC; 9s ago
     Docs: man:dbus-daemon(1)
 Main PID: 18217 (dbus-daemon)
   CGroup: /system.slice/dbus.service
           └─18217 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
Apr 16 15:07:38 systemd[1]: Started D-Bus System Message Bus.
Apr 16 15:07:38 systemd[1]: Starting D-Bus System Message Bus...
● systemd-logind.service - Login Service
   Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static; vendor preset: disabled)
   Active: active (running) since Mon 2018-04-16 15:07:38 UTC; 9s ago
     Docs: man:systemd-logind.service(8)
           man:logind.conf(5)
           http://www.freedesktop.org/wiki/Software/systemd/logind
           http://www.freedesktop.org/wiki/Software/systemd/multiseat
 Main PID: 18220 (systemd-logind)
   Status: "Processing requests..."
   CGroup: /system.slice/systemd-logind.service
           └─18220 /usr/lib/systemd/systemd-logind

Config files:

[root@ip]# cat /usr/lib/systemd/system/sockets.target.wants/dbus.socket
[Unit]
Description=D-Bus System Message Bus Socket
[Socket]
ListenStream=/run/dbus/system_bus_socket
[root@ip]# cat /usr/lib/systemd/system/dbus.socket
[Unit]
Description=D-Bus System Message Bus Socket
[Socket]
ListenStream=/run/dbus/system_bus_socket
3
  • 1
    I think this is unrelated to the problem the OP had. In your case, you're missing the /var/run -> ../run symlink that the filesystem package is supposed to provide.
    – hvd
    Commented Apr 28, 2018 at 10:13
  • Thanks for that. I am afraid @hvd is correct, and this is not the problem (nor does the solution work). I suppose the error message is so uninformative that it is very difficult indeed to derive what the real problem is.
    – Ned64
    Commented Oct 24, 2018 at 15:24
  • Same problem you describing, after manual install of CentOS 7.5 via chroot. Resolved by creating link. Thank you @Dariusz Marszal .
    – week
    Commented Nov 29, 2018 at 17:51
1

Please take a look - https://access.redhat.com/solutions/3522441

Resolution

Create the symbolic link as /var is on separate partition.

# mv -f /var/run /var/run.runmove~
# ln -sfn /run /var/run
# mv -f /var/lock /var/lock.lockmove~
# ln -sfn /run/lock /var/lock

Reboot the system. Same steps can be done using Rescue mode after chroot if the system is down.

1
  • Thanks. In my case, /var is not on a separate partition, therefore the workaround does not apply.
    – Ned64
    Commented Oct 24, 2018 at 15:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .