centos7.2中啓動polkit服務啓動失敗

1. 錯誤表現
在centos7.2系統中重啓服務的時候報錯:git

Error getting authority:Eroor initializing authority:Error calling StartServiceByName for org.freedesktop.PolicyKit1:Timeout was readhed(g-io-error-quark, 24)  

Failed to restart network.service: Connection timed out

使用journalctl查看詳細信息的時候會報以下錯誤:github

[system] Failed to activate service ‘org.freedesktop.PolicyKit1’: timed out

2. 錯誤緣由
這個是一個和polkit.service相關問題。檢查polkit服務的時候發現服務中止並且一樣的,嘗試開啓這個服務的時候報錯:
當使用daemon-reload或者使用restart指令來從新加載啓動polkit服務的時候,競態條件會優先序列將會發生改變,與此同時systemctl status將會立馬報告polkit卡在了啓動狀態。可是polkit進程其實是在運行的,系統只是簡單地忽略掉了bus屬主的改變。($busctl 查看)。ubuntu

3. 解決辦法:centos

  1. 確認是否由polkitd的用戶存在.
  2. 能夠使用polkitd來調試錯誤,直接運行:
    /usr/lib/plokit-1/plokitd
  3. 從新安裝polkit的包而後重啓服務.
    在使用systemd 225的時候會有這類錯誤異常bug,可是到systemd 229的時候修復了。錯誤緣由是當systemd 啓動了這個服務的時候policykit-1的postinst殺掉了polkit的守護進程。在RHEL,CentOS,ubuntu,debain系統上都可以看到相關bug報告反饋。

4.相關連接post

1.可觀察到bug反饋:
https://bugs.launchpad.net/ubuntu/+source/policykit-1/+bug/1447654
https://github.com/coreos/bugs/issues/462網站

2.redhat對此問題的解決方案
https://access.redhat.com/solutions/1543343centos7

3.國外stackexchange問答網站上給出的一些解釋
http://unix.stackexchange.com/questions/249575/systemctl-keeps-timing-out-on-service-restart.net

相關文章
相關標籤/搜索