systemctl keeps timing out on service restart

50,715

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

Share:
50,715

Related videos on Youtube

Admin
Author by

Admin

Updated on November 29, 2022

Comments

  • Admin
    Admin over 1 year

    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.

    • Admin
      Admin over 5 years
      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.)
  • Admin
    Admin over 5 years
    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.
  • Admin
    Admin over 5 years
    What do you mean by manually? ( I am typing these commands manually into the shell. I am a newbie regarding linux commands.)
  • Admin
    Admin over 5 years
    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
  • Jeff Schaller
    Jeff Schaller almost 4 years
    Notice that the OP is using CentOS.