[DONE] mcc not starting -- a polkit problem?

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

[DONE] mcc not starting -- a polkit problem?

Postby mla » May 9th, '16, 10:56

Starting a few days before 30th May (not sure exactly when) I see the following problem on my fully patched Mageia 5...

mcc fails to start if invoked via the KDE menu. If invoked as a non-root user on command line from Konsole, it just sits there doing nothing until I hit CtrlC. If invoked from a non-GUI sessions (again non-root user), I get prompted for the root password, after which I am told

Code: Select all
polkit-agent-helper-1: error response to PolicyKit daemon: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: No session for cookie
==== AUTHENTICATION FAILED ===
Error executing command as another user: Not authorized



If I invoke it as root from Konsole, all is well. Ditto for root from a non-GUI session -- getting the non-GUI version, of course.
Last edited by mla on May 11th, '16, 23:32, edited 1 time in total.
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10

Re: mcc not starting -- a polkit problem?

Postby doktor5000 » May 9th, '16, 11:18

From your description, issue looks like this issue: viewtopic.php?f=7&t=10808 and https://bugs.mageia.org/show_bug.cgi?id=16764
This could be caused by e.g. a hostname change, after which the box or at least the x server was not restarted, or a few other reasons which are equally rare.

Please provide the output of the following commands, run as your regular user in a terminal:
Code: Select all
loginctl show-session $XDG_SESSION_ID
ps -ef|grep -v grep|grep -iE "polkit|policykit"
pkexec whoami     # you need to enter your root password when asked by the authentication dialog
echo $DISPLAY

and as root from:
Code: Select all
systemctl status polkit.service -a
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mcc not starting -- a polkit problem?

Postby mla » May 9th, '16, 12:23

Doesn't look quite like either topic 10808 or the bug 16764. On a GUI terminal command line there is simply no response, while in a tty session the response is much more detailed than just "Not authorized". And there has not been any change in the name of the host or anything like that.

Here's the requested output. As me (mla@Athlon):

Code: Select all
[mla@Athlon ~] loginctl show-session $XDG_SESSION_ID
Id=c2
Name=mla
Timestamp=Mon 2016-05-09 11:01:43 BST
TimestampMonotonic=4662893511
VTNr=1
Display=:0
Remote=no
Service=kdm
Scope=session-c2.scope
Leader=4863
Audit=0
Type=x11
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
[mla@Athlon ~] ps -ef|grep -v grep|grep -iE "polkit|policykit"
polkitd   2124     1  0 09:44 ?        00:00:00 /usr/lib/polkit-1/polkitd --no-debug
mla       6562     1  0 11:01 ?        00:00:00 /usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1
[mla@Athlon ~] pkexec whoami
^C
[mla@Athlon ~] echo $DISPLAY
:0


Note "pkexec whoami" also just sitting there until aborted. Unsourprisingly, in a non-GUI (tty) sessionI get exactly the same response as tying to run mcc.

And as root (root@Athlon):

Code: Select all
[root@Athlon ~]# systemctl status polkit.service -a
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: active (running) since Mon 2016-05-09 09:44:26 BST; 1h 25min ago
     Docs: man:polkit(8)
 Main PID: 2124 (polkitd)
   CGroup: /system.slice/polkit.service
           └─2124 /usr/lib/polkit-1/polkitd --no-debug

May 09 09:44:26 Athlon polkitd[2124]: Started polkitd version 0.113
May 09 09:44:26 Athlon polkitd[2124]: Loading rules from directory /etc/polkit-1/rules.d                                                                       
May 09 09:44:26 Athlon polkitd[2124]: Loading rules from directory /usr/share/polkit-1/rules.d                                                                 
May 09 09:44:26 Athlon polkitd[2124]: Finished loading, compiling and executing 3 rules                                                                         
May 09 09:44:26 Athlon polkitd[2124]: Acquired the name org.freedesktop.PolicyKit1 on the system bus                                                           
May 09 09:44:34 Athlon polkitd[2124]: Registered Authentication Agent for unix-session:c1 (system bus name :1.28 [/usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8)                                                                         
May 09 10:11:06 Athlon polkitd[2124]: Unregistered Authentication Agent for unix-session:c1 (system bus name :1.28, object path /org/kde/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8)
May 09 10:11:06 Athlon polkitd[2124]: Operator of unix-session:c1 FAILED to authenticate to gain authorization for action org.mageia.drakconf.pkexec.run for unix-process:4045:49215 [/usr/bin/perl /usr/bin/drakconf] (owned by unix-user:mla)
May 09 11:01:50 Athlon polkitd[2124]: Registered Authentication Agent for unix-session:c2 (system bus name :1.69 [/usr/lib64/kde4/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale en_GB.UTF-8)
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10

Re: mcc not starting -- a polkit problem?

Postby doktor5000 » May 9th, '16, 12:53

mla wrote:
Code: Select all
[mla@Athlon ~]
[mla@Athlon ~] pkexec whoami
^C


Note "pkexec whoami" also just sitting there until aborted. Unsourprisingly, in a non-GUI (tty) sessionI get exactly the same response as tying to run mcc.


This is your issue.

How exactly do you start your X session? An does
Code: Select all
xhost +
as root change anything for the behaviour?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mcc not starting -- a polkit problem?

Postby mla » May 9th, '16, 13:38

X session started automatically on login.

No, "xhost +" as root makes no difference. And I have no problem running X sessions on this machine from remote machines on my network anyway.

BTW, my apologies, I should have said that the problem occurs only on my main machine. (It is, incidentally, the one which of late refuses to power off on shutdown as per viewtopic.php?f=8&t=10948)
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10

Re: mcc not starting -- a polkit problem?

Postby doktor5000 » May 9th, '16, 13:46

mla wrote:X session started automatically on login.
[...]
And I have no problem running X sessions on this machine from remote machines on my network anyway.


Sorry but you need to be a little more verbose. What do you mean by "X session started automatically on login" ? What particular did you configure for what login, something in ~/.xinitrc or ~/.bashrc of the user in question?
Is that a local X session on the box you're talking about? How does it differ from a regular Mageia installation, which usually starts a display/login manager during boot which starts the X session?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: mcc not starting -- a polkit problem?

Postby mla » May 9th, '16, 13:55

Sorry, I am still a bit spaced out after lazing for a week in Dubrovnik. :-) I said "on login", but I meant "on boot". :-( Standard Mageia setup.
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10

Re: mcc not starting -- a polkit problem?

Postby mla » May 11th, '16, 17:45

Well, given that my main machine had two annoying problems with no obvious solution (not powering off on power-off and not starting mcc and such like by a non-root user), I took the drastic action of re-installing the system from scratch, installing various additional packages from Mageia repositories and updating the lot. And both problems disappeared! Not sure now -- does it count as SOLVED? Trouble is, I have no idea what the cause was. Or should I mark this thread as RESOLVED (or something similar)?

BTW... The non-starting of mcc did appear briefly in this process. It worked fine after the install, but stopped working after I updated the system. But it started working again after the machine got rebooted.
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10

Re: mcc not starting -- a polkit problem?

Postby doktor5000 » May 11th, '16, 19:36

Mark it as DONE, same as the other thread - usually applies when you don't know what the actual problem/solution was, but if it's fixed now.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18058
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [DONE] mcc not starting -- a polkit problem?

Postby mla » May 11th, '16, 23:32

Done. :-)
mla
 
Posts: 292
Joined: Sep 16th, '11, 16:10


Return to Basic support

Who is online

Users browsing this forum: No registered users and 1 guest