systemctl保持服务重启超时


10

我正在运行CentOS 7.2;见下文:

# systemctl stop firewalld
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24)
Failed to stop firewalld.service: Connection timed out
Failed to get load state of firewalld.service: Connection timed out

journalctl 只是报告以下错误: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out

我发现此错误适用于Ubuntu,可能与RHEL 7 错误相关


快速修复:您可以通过重新引导计算机来摆脱此错误。(但我不确定是否会再次出现。)
toni

Answers:


11

这是一个问题polkit.service;这不是我的开始。

经过进一步调查,我发现该polkitd用户不存在。然后yum reinstall polkitsystemctl start polkit固定的问题。

我通过polkitd直接运行调试了它:/usr/lib/polkit-1/polkitd


尝试了此解决方案,但在致电时systemctl start polkit遇到了相同的错误:Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached (g-io-error-quark, 24) Failed to start polkit.service: Connection timed out See system logs and 'systemctl status polkit.service' for details.
toni

手动是什么意思?(我正在外壳中手动键入这些命令。我是有关Linux命令的新手。)
toni

这是结果(但请注意,我在此同时重新启动了服务器,这消除了有问题的错误):Successfully changed to user polkitd --- Loading rules from directory /etc/polkit-1/rules.d --- Loading rules from directory /usr/share/polkit-1/rules.d --- Finished loading, compiling and executing 2 rules --- Entering main event loop --- Connected to the system bus --- Lost the name org.freedesktop.PolicyKit1 - exiting --- Shutting down --- Exiting with code 0
toni
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.