Page 1 of 3 123 LastLast
Results 1 to 10 of 28

Thread: Error calling StartServiceByName for org.freedesktop.PolicyKit1

  1. #1

    Default Error calling StartServiceByName for org.freedesktop.PolicyKit1

    I recently had an issue where my /etc directory got wiped out, then semi restored.

    I have spent some time reinstalling packages that have files in /etc, and now most things work with the exception of such items as USB automounting, the gdm login screen will not come up, just the no option xdm; utilities such as pkaction will not run.

    From messages I see repeated blocks like this
    Code:
    Oct 13 11:57:41 <host> systemd[1]: Started Authorization Manager.
    Oct 13 11:58:06 <host> dbus-daemon[1388]: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    Oct 13 11:58:06 <host> rtkit-daemon[2572]: Warning: PolicyKit call failed: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    Oct 13 11:58:06 <host> dbus-daemon[1388]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service' requested by ':1.29' (uid=0 pid=2572 comm="/usr/lib/rtkit/rtkit-daemon ")
    Oct 13 11:58:06 <host> systemd[1]: Starting Authorization Manager...
    Oct 13 11:58:06 <host> polkitd[22640]: Started polkitd version 0.116
    Oct 13 11:58:06 <host> polkitd[22640]: Loading rules from directory /etc/polkit-1/rules.d
    Oct 13 11:58:06 <host> polkitd[22640]: Loading rules from directory /usr/share/polkit-1/rules.d
    Oct 13 11:58:06 <host> polkitd[22640]: Finished loading, compiling and executing 4 rules
    Oct 13 11:58:06 <host> polkitd[22640]: Lost the name org.freedesktop.PolicyKit1 - exiting
    xsession-errors has similar messages
    Code:
    Oct 11 17:35:14 linux-3wjh dbus-daemon[1388]: [system] Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    Oct 11 17:35:14 linux-3wjh accounts-daemon[2111]: error getting polkit authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    Oct 11 17:35:14 linux-3wjh accounts-daemon[2111]: Failed to initialize daemon
    Oct 11 17:35:14 linux-3wjh dbus-daemon[1388]: [system] Successfully activated service 'org.freedesktop.Accounts'
    Oct 11 17:35:14 linux-3wjh systemd[1]: Started Accounts Service.
    Oct 11 17:35:14 linux-3wjh systemd[1]: Startup finished in 2.236s (kernel) + 1.173s (initrd) + 47.493s (userspace) = 1min 12.731s.
    Oct 11 17:35:14 linux-3wjh gdm: Failed to list cached users: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name :1.16 was not provided by any .service files
    Oct 11 17:35:14 linux-3wjh dbus-daemon[1388]: [system] Activating via systemd: service name='org.freedesktop.Accounts' unit='accounts-daemon.service' requested by ':1.19' (uid=0 pid=2376 comm="gdm-session-worker [pam/gdm-launch-environment] ")
    Oct 11 17:35:14 linux-3wjh systemd[1]: Starting Accounts Service...
    Oct 11 17:35:14 linux-3wjh dbus-daemon[1388]: [system] Activating via systemd: service name='org.freedesktop.PolicyKit1' unit='polkit.service' requested by ':1.20' (uid=0 pid=2379 comm="/usr/lib/accounts-daemon ")


    When I try to run any pkaction command, it times out like

    Code:
    # pkaction |grep login
    Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    polkit and pkaction have been reinstalled.

    Gnome/MATE does actually come up with the desktop.

  2. #2

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    The error when I try to open a USB drive, from the desktop as user:
    Code:
    Unable to mount usbhdd
    Not authorized to perform operation (polkit authority not available and caller is not uid 0)

  3. #3
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,878
    Blog Entries
    2

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    When you simply re-install any package, the configuration files are not touched, so you retain whatever custom settings you made.
    If you want to restore default configurations, you have to install using the "-f" flag to do a "force re-installation" and then your configuration files will be over-written with defaults from the package.
    Code:
    zypper in -f package_name
    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,872
    Blog Entries
    14

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Quote Originally Posted by tsu2 View Post
    When you simply re-install any package, the configuration files are not touched, so you retain whatever custom settings you made.
    If you want to restore default configurations, you have to install using the "-f" flag to do a "force re-installation" and then your configuration files will be over-written with defaults from the package.
    Code:
    zypper in -f package_name
    TSU
    @Tsu2: Please read posts and questions first, before replying. The OP clearly states that his /etc was wiped out, so the original configs are gone.

    @OP: I think you would be better of with a reinstall. Choices you make during install end up as values of keys in various config files. Same goes for actions taken from various YaST modules. Reinstalling would also give you the chance to use btrfs. In cases like this, it can be a real rescue, i.e. you can return to a btrfs snapshot from before the "accident", which would have brought back /etc as it was.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  5. #5

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    I actually did a reinstallation from the DVD ISO, not an upgrade install; and I noticed that most of my affected files (the restored ones all curiously had an odd date attached) were still intact.

  6. #6

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    OK, I did zypper in -f to gpg2, polkit, gconf-polkit, polkit-gnome, polkit-kde-agent-5, and systemd packages.


    I still get the no-options xdm login screen (DM=gdm, WM=mate-sessions in /etc/alternatives) and this when I try to access the USB
    Code:
    Unable to mount usbhdd
    Not authorized to perform operation (polkit authority not available and caller is not uid 0)

    FYI, mounting from the CLI as root works.


    xsession-errors:
    Code:
    (package-update-indicator:2552): package-update-indicator-WARNING **: 10:10:40.891: failed to instantiate backend: Error calling StartServiceByName for org.freedesktop.PackageKit: Timeout was reached
    Connection failure: Timeout
    mate-session[2278]: WARNING: Could not make DBUS call: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    
    
    ** (mate-panel:2483): WARNING **: 10:11:04.778: Could not ask session manager if shut down is available: Timeout was reached
    mate-session[2278]: WARNING: Could not make DBUS call: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    mate-session[2278]: WARNING: Could not make DBUS call: Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=2278 comm="/usr/bin/mate-session ") interface="org.freedesktop.login1.Manager" member="CanSuspend" error name="(unset)" requested_reply="0" destination=":1.3" (uid=0 pid=1406 comm="/usr/lib/systemd/systemd-logind ")
    mate-session[2278]: WARNING: Could not make DBUS call: Rejected send message, 2 matched rules; type="method_call", sender=":1.24" (uid=1000 pid=2278 comm="/usr/bin/mate-session ") interface="org.freedesktop.login1.Manager" member="CanHibernate" error name="(unset)" requested_reply="0" destination=":1.3" (uid=0 pid=1406 comm="/usr/lib/systemd/systemd-logind ")

    Also still see the same repeated lines in message as previously posted.

  7. #7

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Looking into some other threads, they recommend to run this command to see what registered actions are active, but I can not even see this:
    Code:
    # pkaction --verbose
    Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms)
    Is there any way to figure out why pkaction can not run any of the normal commands?

    I have compared rules and permissions files to a secondary disk, installed on this same system that works fine trying to see what may be different. polkit-* and the rules in /etc/polkit-1/rules.d are identical.

  8. #8

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Any ideas on this? I really need to get this fixed as I can not install app like VirtualBox Extension Pack without this type of error
    Code:
    The installer failed with exit code 127: Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: Failed to activate service 'org.freedesktop.PolicyKit1': timed out (service_start_timeout=25000ms).


    I have reinstalled these packages:
    [/CODE]
    Code:
    zypper in -f polkit
    zypper in -f polkit-gnome
    zypper in -f polkit-default-privs
    zypper in -f polkit-kde-agent-5
    zypper in -f gpg2
    zypper in -f gconf-polkit
    zypper in -f mate-polkit
    zypper in -f polkit-default-privs
    zypper in -f systemd
    zypper in -f dbus-1-x11
    yet I can not install certain apps or mount USB keys, except at root.

    Currently, my DM=KDM, WM=mate.session.


  9. #9

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    From another thread I saw, I ran
    Code:
    # getent passwd polkitd >/dev/null && echo -e "\e[1;32mpolkitd user already exists\e[0m" || { useradd -r -g polkitd -d / -s /sbin/nologin -c "User for polkitd" polkitd && echo -e "\e[1;33mAdded missing polkitd user\e[0m" || echo -e "\e[1;31mAdding polkitd user FAILED\e[0m"; }
    
    
    polkitd user already exists

    followed by
    Code:
    rpm -Va polkit\* && echo -e "\e[1;32mpolkit* rpm verification passed\e[0m" || { echo -e "\e[1;33mResetting polkit* rpm user/group ownership & perms\e[0m"; rpm --setugids polkit polkit-pkla-compat; rpm --setperms polkit polkit-pkla-compat; }
    
    
    
    
    S.5....T.  c /etc/dbus-1/system.d/org.freedesktop.PolicyKit1.conf
    S.5....T.  c /etc/pam.d/polkit-1
    Resetting polkit* rpm user/group ownership & perms

    Rebooted, but the issue persists.

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    12,878
    Blog Entries
    2

    Default Re: Error calling StartServiceByName for org.freedesktop.PolicyKit1

    Quote Originally Posted by Knurpht View Post
    @Tsu2: Please read posts and questions first, before replying. The OP clearly states that his /etc was wiped out, so the original configs are gone.

    @OP: I think you would be better of with a reinstall. Choices you make during install end up as values of keys in various config files. Same goes for actions taken from various YaST modules. Reinstalling would also give you the chance to use btrfs. In cases like this, it can be a real rescue, i.e. you can return to a btrfs snapshot from before the "accident", which would have brought back /etc as it was.
    Yes,
    And the @OP said "semi restored" whatever that might mean.
    So,
    My recommendation specifically addresses the specific application(s) if that is all that needs to be repaired.
    Your suggestion to re-install would probably be the appropriate solution if the problem is more extensive than the specified applications.

    In any case,
    I see that the latest post by the @OP is that trying these suggestions have not worked so far.

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

Page 1 of 3 123 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •