polkit conniptions

Issues related to applications and software problems
Post Reply
mathog
Posts: 47
Joined: 2008/07/09 23:52:06

polkit conniptions

Post by mathog » 2018/07/13 19:03:41

Rebooted a Centos 7 system for the first time in 450ish days. It came up, but it is in an odd state.

Release: CentOS Linux release 7.5.1804 (Core)

Code: Select all

systemctl restart dhcpd.service
Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (g-dbus-error-quark, 20)
Failed to restart dhcpd.service: Connection timed out
See system logs and 'systemctl status dhcpd.service' for details.
Googled and the consensus was that this is a polkit issue. It was not running so

Code: Select all

yum reinstall polkit
systemctl start polkit.service
same error as before. Great - polkit cannot start because polkit is not started!

Finally I started it manually (as root)

Code: Select all

/usr/lib/polkit-1/polkitd --no-debug &
That let systemctl restart dhcpd.service, however it seemed that polkit is still confused (or I am):

Code: Select all

 ps -ef | grep polkit
polkitd   4529  4175  0 11:24 pts/2    00:00:00 /usr/lib/polkit-1/polkitd --no-debug
systemctl restart polkit.service
systemctl status polkit.service
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static; vendor preset: enabled)
   Active: inactive (dead) since Fri 2018-07-13 11:56:30 PDT; 53s ago
     Docs: man:polkit(8)
  Process: 5275 ExecStart=/usr/lib/polkit-1/polkitd --no-debug (code=exited, status=0/SUCCESS)
 Main PID: 5275 (code=exited, status=0/SUCCESS)

Jul 13 11:56:30 machinename systemd[1]: Starting Authorization Manager...
Jul 13 11:56:30 machinename  polkitd[5275]: Started polkitd version 0.112
Jul 13 11:56:30 machinename  polkitd[5275]: Loading rules from directory /etc/polkit-1/rules.d
Jul 13 11:56:30 machinename  polkitd[5275]: Loading rules from directory /usr/share/polkit-1/rules.d
Jul 13 11:56:30 machinename  polkitd[5275]: Finished loading, compiling and executing 8 rules
Jul 13 11:56:30 machinename  polkitd[5275]: Lost the name org.freedesktop.PolicyKit1 - exiting
Jul 13 11:56:30 machinename  systemd[1]: Started Authorization Manager.
 ps -ef | grep polkit
polkitd   4529  4175  0 11:24 pts/2    00:00:00 /usr/lib/polkit-1/polkitd --no-debug
It _says_ that it restarted it, but it just left the manually started one running.

Code: Select all

rpm -qa | grep -i polkit
polkit-gnome-0.106-0.1.20170423gita0763a2.el7.x86_64
polkit-pkla-compat-0.1-4.el7.x86_64
polkit-0.112-14.el7.x86_64
Any pointers on how to get out of this situation???

Thanks

Note added - there are polkitd entries in /etc/passwd and /etc/group respectively

Code: Select all

polkitd:x:997:996:User for polkitd:/:/sbin/nologin
polkitd:x:996:
This

https://access.redhat.com/solutions/1543343

says also to reset the ownerships and file permissions, which is what I think the yum reinstall did.

mathog
Posts: 47
Joined: 2008/07/09 23:52:06

Re: polkit conniptions

Post by mathog » 2018/07/13 22:52:57

Also, once every minute these messages show up in /var/log/messages:

Code: Select all

Jul 13 15:51:03 machinename dbus[759]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 15:51:03 machinename systemd-logind: Failed to enable subscription: Failed to activate service 'org.freedesktop.systemd1': timed out
Jul 13 15:51:03 machinename systemd-logind: Failed to fully start up daemon: Connection timed out
Jul 13 15:51:03 machinename systemd: systemd-logind.service: main process exited, code=exited, status=1/FAILURE
Jul 13 15:51:03 machinename systemd: Failed to start Login Service.
Jul 13 15:51:03 machinename systemd: Unit systemd-logind.service entered failed state.
Jul 13 15:51:03 machinename systemd: systemd-logind.service failed.
Jul 13 15:51:03 machinename systemd: systemd-logind.service has no holdoff time, scheduling restart.
Jul 13 15:51:03 machinename systemd: Starting Login Service...

mathog
Posts: 47
Joined: 2008/07/09 23:52:06

Re: polkit conniptions

Post by mathog » 2018/07/13 23:34:26

This method seems to have fixed it. With the manually started polkit running:

Code: Select all

systemctl restart dbus.service
PolicyKit daemon disconnected from the bus.
We are no longer a registered authentication agent.
at this point there is no polkit process and there is (still) a dbus-daemon. However this one behaves differently, because it allows polkit to start normally.

Code: Select all

systemctl start polkit.service
No hiccups.

The clusters of messages in /var/log/messages noted in the previous post stopped.

That leaves one question - why did it fail on boot? Make that two questions, will it now fail on all boots?

User avatar
TrevorH
Forum Moderator
Posts: 23049
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: polkit conniptions

Post by TrevorH » 2018/07/13 23:53:03

That sounds to me more like you have a dbus problem...
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply