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
/usr/lib/plokit-1/plokitd
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