
特定のコンピュータを再起動すると、エラーメッセージが表示されます。
# init 6
Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)
私はこれがサービスのためであることを知りましたdbus
。次のようにエラーメッセージを表示できます。
# systemctl stop dbus.service
Error getting authority: Error initializing authority: Could not connect: Connection refused (g-io-error-quark, 39)
もちろん、これはすべてルートシェルで行われます。
これが何を意味するのか、どうやって解決するのかご存知ですか? 私はこれがd-bus
正しく文書化されていないようです(または私にとっては複雑すぎるか、両方)と思います。
コンピュータはCentOS Linuxバージョン7.2.1511を実行しており、最新の状態です。
答え1
私にとって、これはRHEL 7.4 - > 7.5アップグレード後に発生しました。 Dbusソケットがに移動されました/run/dbus/system_bus_socket
。 systemdは/run/dbus/system_bus_socket
まだ次のように接続しようとしていることを明示的に述べています/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)
/run/dbus/ソケットに接続していることを確認してください。
[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
明らかにまだ/var/run/dbus/system_bus_socketを探しています。
/var/run/dbus/system_bus_socket
次に接続する/run/dbus/system_bus_socket
:
[root@ipsystem]# ln -s /run/dbus/system_bus_socket /var/run/dbus/system_bus_socket```
これで期待どおりに動作します。
[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
構成ファイル:
[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
答え2
これを見てください -https://access.redhat.com/solutions/3522441
解決する
/ varが別々のパーティションにあるため、シンボリックリンクを作成します。
# 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
システムを再起動します。システムがダウンしている場合は、chrooting後に回復モードを使用して同じ手順を実行できます。