我正在嘗試重新啟動 httpd 但出現以下錯誤
$ systemctl restart httpd
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
經過調查發現這是一個 dbus 問題,嘗試使用 REST dbus 但出現與上面相同的錯誤。檢查 /var/log/messages 後,我收到以下錯誤:
<info> [1559812709.0738] bus-manager: could not connect to the system bus (Could not connect: No such file or directory); only the private D-Bus socket will be available
Jun 6 14:48:32 db1 NetworkManager[329115]: <info> [1559812712.0731] bus-manager: could not connect to the system bus (Could not connect: No such file or directory); only the private D-Bus socket will be available
$ cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
注意:/var
並且/
位於相同分割區,而且我無法重新啟動 NetworkManager
答案1
我也遇到同樣的問題,誤刪除/var/run
了。
解決重新建立連結:
ln -s /run/dbus /var/run/dbus