14

I'm running CentOS 7.2; see below:

# 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 just reports the following error: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out

I found this bug for Ubuntu and a possible related one for a RHEL 7 bug.

  • for a quick-fix: You can get rid of this error by rebooting the machine. (But I am not sure whether it will come up again.) – toni Nov 19 '18 at 16:41

2 Answers2

13

This is an issue with polkit.service; it was not starting for me.

After further investigation I found that the polkitd user did not exist. Then yum reinstall polkit and systemctl start polkit fixed the issue.

I debugged this by running polkitd directly: /usr/lib/polkit-1/polkitd

  • tried this solution, but when calling `systemctl start polkit` I get the same error: `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 Nov 08 '18 at 10:39
  • What do you mean by manually? ( I am typing these commands manually into the shell. I am a newbie regarding linux commands.) – toni Nov 09 '18 at 08:51
  • this is the result (but mind that I rebooted the server in the mean time, which got rid of the error in question): `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 Nov 12 '18 at 08:40
0

it could be a dbus problem. consider to reinstall one.

apt install dbus

reboot after installing as dbus configs gets upgraded only after.

Oleg Kokorin
  • 489
  • 6
  • 6