PolicyKit authorization error

matthew stanger stangerm2 at gmail.com
Thu Nov 10 18:49:16 UTC 2016


Sorry this one was my bad, I swore I had MM set to boot after polkit in
systemd. However my the systemd config for MM was booting out of the /lib
instead of the /etc copy that I edited. I missed this the first time b/c
our logs roll off.The error was:

<warn>  [1477629248.421984] [mm_auth_provider_polkit_init ():183]: failed
to create PolicyKit authority: 'Error initializing authority: Error calling
StartServiceByName for org.freedesktop.PolicyKit1: Timeout was reached'

I can provide a little patch, though I don't know if it's of value to the
community as I don't think it's best practice to not have your boot order
wrong. That being said would it make sense in mm-auth-provider-polkit.c to
have the 'authorize' function if it is '! authority' to re-call the
'mm_auth_provider_polkit_init' function and then only send the error if it
fails again. That way calls could have a chance of recovering instead of MM
pretty much just being dead on the bus, as mmcli can't make any calls in
this case either? Idk if it's good form but if you think it's worth having
I'll submit a patch. Let me know.

Thanks

On Wed, Nov 2, 2016 at 10:11 AM, Dan Williams <dcbw at redhat.com> wrote:

> On Mon, 2016-10-24 at 13:43 -0600, matthew stanger wrote:
> > Hi all,
> >
> > I just upgraded our little box with MM 1.6 to systemd 230 and I'm now
> > getting a PolicyKit error from mmcli. The issue only happens about 1
> > out of
> > 10 times after a reboot. The other 9 times everything is fine, weird.
> > When
> > I do a simple connect I get the error  "PolicyKit authorization
> > error:
> > authority not found". Right now polkit is version 0.112 and I have MM
> > set
> > to start After=polkit.service. I'm thinking I just need to upgrade
> > polkit
> > but before hacking that recipe in Yocto I just wanted to see what
> > you're
> > opinions where. The goal of this has been to get the 1.6MM recipe
> > pushed to
> > back to Yocto since no one has done that yet. Anyways I just wanted
> > to see
> > what you guys think before digging in the code. Let me know where you
> > think
> > I should look.
>
> Late reply, but anyway...
>
> This happens when ModemManager can't talk to PolicyKit when it starts.
>  Do you have logs earlier than this, like from right when MM has
> started?  It should print out something like "failed to create
> PolicyKit authority" with more useful error information.
>
> Dan
>
>
> > Here's the last little spinet from debug logs though it's not too
> > helpful.
> >
> > 2016-10-24T19:23:43.722766+00:00 renew ModemManager[1635]: <debug>
> > (ttyACM1) device open count is 0 (close)
> > 2016-10-24T19:23:43.730435+00:00 renew ModemManager[1635]: <debug>
> > (ttyACM1) closing serial port...
> > 2016-10-24T19:23:43.737704+00:00 renew ModemManager[1635]: <debug>
> > (ttyACM1) serial port closed
> > 2016-10-24T19:23:43.745185+00:00 renew ModemManager[1635]: <debug>
> > modem
> > properly initialized
> > 2016-10-24T19:23:43.752817+00:00 renew ModemManager[1635]: <debug>
> > Exported
> > modem '/sys/devices/ahb.0/a00000.ohci/usb1/1-1' at path
> > '/org/freedesktop/ModemManager1/Modem/0'
> > 2016-10-24T19:23:43.759875+00:00 renew ModemManager[1635]: <debug>
> > (/org/freedesktop/ModemManager1/Modem/0): 'Cinterion' modem, VID
> > 0x1E2D PID
> > 0x0061 (usb)
> > 2016-10-24T19:23:43.773026+00:00 renew modem_monitor[1993]: Call to
> > g_dbus_connection_call_sync failed:
> > GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed:
> > PolicyKit
> > authorization error: 'authority not found'
> > 2016-10-24T19:23:48.739557+00:00 renew modem_monitor[1993]: Call to
> > g_dbus_connection_call_sync failed:
> > GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Failed:
> > PolicyKit
> > authorization error: 'authority not found'
> >
> > Thanks,
> > Matt
> > _______________________________________________
> > ModemManager-devel mailing list
> > ModemManager-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20161110/2cd912ba/attachment.html>


More information about the ModemManager-devel mailing list