You are not logged in.

#1 2012-11-01 09:32:04

Usul
Member
Registered: 2007-05-17
Posts: 31

Transition to systemd: polkit doesn't start

Since it's more and more obvious, that systemd is the way to go, I tried to do the transition. I've read the wiki page, prepared my system, added the init parameter to my kernel boot line. First try was surprisingly smooth, my XFCE desktop appears, nearly everything was fine.

Nearly. What wasn't fine was polkit. It didn't start, and because of this, some other things like  udisks and upower doesn't start either. I tried to debug the problem:

#  systemctl start polkit
Job for polkit.service failed. See 'systemctl status polkit.service' and 'journalctl -n' for details.
systemctl status polkit.service
polkit.service - Authorization Manager
	  Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
	  Active: failed (Result: exit-code) since Thu, 2012-11-01 10:25:55 CET; 35s ago
	    Docs: man:polkit(8)
	 Process: 10963 ExecStart=/usr/lib/polkit-1/polkitd --no-debug (code=exited, status=1/FAILURE)
	  CGroup: name=systemd:/system/polkit.service

Nov 01 10:25:55 itchy systemd[1]: Starting Authorization Manager...
Nov 01 10:25:55 itchy systemd[1]: polkit.service: main process exited, code=exited, status=1/FAILURE
Nov 01 10:25:55 itchy systemd[1]: Failed to start Authorization Manager.
Nov 01 10:25:55 itchy systemd[1]: Unit polkit.service entered failed state
journalctl -n
[…]
Nov 01 10:25:55 itchy systemd[1]: Starting Authorization Manager...
Nov 01 10:25:55 itchy systemd[1]: polkit.service: main process exited, code=exited, status=1/FAILURE
Nov 01 10:25:55 itchy systemd[1]: Failed to start Authorization Manager.
Nov 01 10:25:55 itchy systemd[1]: Unit polkit.service entered failed state

That's all. I don't know where to get more information about the failure, and with this level of detailed information, I can't do anything. I tried to find solutions in the wiki and here in the forum, but I didn't find any similar problem description.

Since I'm not familiar with systemd, can someone give me some hints to track down the problem? I'm a little bit lost here … Nice first impression from systemd, I have to say …

Offline

#2 2012-11-01 11:38:22

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Transition to systemd: polkit doesn't start

Make sure the polkitd user exists.

Offline

#3 2012-11-01 12:23:13

Usul
Member
Registered: 2007-05-17
Posts: 31

Re: Transition to systemd: polkit doesn't start

Almost right: It was the group which doesn't exist! Looking into pacman.log reveals, that there was a problem while installing polkit, the mentioned group couldn't get created because the GID was already used by another group. Solving this conflict, installing polkit again, this time whitout errors, and polkit starts without problems!

Thank you!

Offline

#4 2012-11-03 13:09:47

Sander
Member
Registered: 2006-02-26
Posts: 138

Re: Transition to systemd: polkit doesn't start

Hi, it looks like I'm having the same problem. Polkit fails to start, and attempting to reinstall polkit gives:

groupadd: GID '102' already exists
useradd: group 'polkitd' does not exist
error: command failed to execute correctly

I had a look in /etc/group and this includes the line:

tex:x:102:

May I ask how exactly you solved the conflict? Is it safe to just remove this group? I didn't create this group, it must have been created by some package at some point in the past, I guess. I have 3 other computers which I just updated as well, and the problem did not occur there (because no such group exists on those computers).

Thanks for the information at any rate. There seem to be a lot of different symptoms that can also be caused by other problems, so I had a hard time identifying the issue. They include XFce taking a very long time to start, removable drives not showing up on the desktop / in Thunar until I log out and back in again, and then still failing to mount the drives with the error message "Not authorized to perform operation (polkit authority not available and caller is not uid 0)". That last one was the clue that lead me here smile

EDIT: I just found this and tried it: https://bbs.archlinux.org/viewtopic.php?id=121824
Looks like the tex group owns a couple of files on my system though (unsurprisingly they are all TeX-related): everything in /usr/local/share/texmf. They were all last modified on october 3rd, 2008 and november 2nd 2008. So I guess a package installation back then created the group or something.
I don't think these files are still in use (there is also a /usr/share/texmf with more recent files), and pacman -Qo says they aren't owned by any package. So I guess I'll just remove them and get rid of the group as well. Interestingly, the wiki does make mention of the files and the 'tex' group: https://wiki.archlinux.org/index.php/TeX_Live

A skeleton of a local texmf tree is at /usr/local/share/texmf: this directory is writable for members of the group tex.

Perhaps this information is very dated?

Last edited by Sander (2012-11-03 13:43:06)


You like cheese? You like peas? You'll love cheezy peas!

Offline

#5 2012-11-03 23:12:59

hunterthomson
Member
Registered: 2008-06-22
Posts: 794
Website

Re: Transition to systemd: polkit doesn't start

You could resolve this problem by doing this...

1. make a list of all the files/dir's that are owned by the 'tex' group

2. Edit /etc/group change the group # of 'tex' to some other #, and add the polkitd group..

tex:x:202:
polkitd:x:102:

3. Then chown all the files/dir's that where owned by the 'tex' group again, which will change them to the new group #.
USER-NAME = the current owner
FILE-NAME-OR-DIR-NAME = the name of the file or dir you need to fix

chown USER-NAME:tex FILE-NAME-OR-DIR-NAME

Last edited by hunterthomson (2012-11-03 23:15:04)


OpenBSD-current Thinkpad X230, i7-3520M, 16GB CL9 Kingston, Samsung 830 256GB
Contributor: linux-grsec

Offline

#6 2012-11-04 01:50:49

initbox
Member
Registered: 2008-09-27
Posts: 172

Re: Transition to systemd: polkit doesn't start

Wow, thanks for this information, I was having the same problem apparently.

I thought it was a problem with upowerd, but it was because polkit didn't work so neither did upowerd.

I didn't have the polkitd user at all.

Pacman log says this:

[2012-10-31 21:30] /tmp/alpm_O44XJj/.INSTALL: line 3: useradd: command not found

However:

# which useradd
/usr/sbin/useradd

After pacman -S polkit upower the user appeared and both services started normally.

Offline

#7 2012-11-04 12:44:46

lsathler
Member
Registered: 2010-05-15
Posts: 16

Re: Transition to systemd: polkit doesn't start

hunterthomson wrote:

You could resolve this problem by doing this...

1. make a list of all the files/dir's that are owned by the 'tex' group

2. Edit /etc/group change the group # of 'tex' to some other #, and add the polkitd group..

tex:x:202:
polkitd:x:102:

3. Then chown all the files/dir's that where owned by the 'tex' group again, which will change them to the new group #.
USER-NAME = the current owner
FILE-NAME-OR-DIR-NAME = the name of the file or dir you need to fix

chown USER-NAME:tex FILE-NAME-OR-DIR-NAME

Same problem here. Solved following these procedures.
I have found two main dirs that belongs to tex group: they're '/opt/texlive/texmf-local' and '/usr/local/share/texmf', except for a file inside it named  'ls-R'

Offline

#8 2012-11-04 13:27:31

ball
Member
From: Germany
Registered: 2011-12-23
Posts: 164

Re: Transition to systemd: polkit doesn't start

Sander wrote:

Looks like the tex group owns a couple of files on my system though (unsurprisingly they are all TeX-related): everything in /usr/local/share/texmf. They were all last modified on october 3rd, 2008 and november 2nd 2008. So I guess a package installation back then created the group or something.
I don't think these files are still in use (there is also a /usr/share/texmf with more recent files), and pacman -Qo says they aren't owned by any package. So I guess I'll just remove them and get rid of the group as well. Interestingly, the wiki does make mention of the files and the 'tex' group: https://wiki.archlinux.org/index.php/TeX_Live

A skeleton of a local texmf tree is at /usr/local/share/texmf: this directory is writable for members of the group tex.

Perhaps this information is very dated?

/usr/local/share/texmf is the place where to install custom packages/fonts. Apparently I've got a more recent TeX installation, the directory is owned by root and the users group. Furthermore, the tex group doesn't exist in my installation.

So why not remove the tex group and do chown root:users on the corresponding directories...

Offline

#9 2012-11-04 21:37:44

goodgrue
Member
From: CA, USA
Registered: 2008-11-19
Posts: 41

Re: Transition to systemd: polkit doesn't start

I had this same problem, except for me the gdm group had gid 102. After uninstalling and reinstalling gdm, the group now has gid 120 and polkit installs correctly.

Offline

Board footer

Powered by FluxBB