You are not logged in.

#1 2014-06-06 01:33:20

seanthor
Member
Registered: 2013-08-18
Posts: 20

systemctl errors after system upgrade [resolved]

Hi all,

I just upgraded my system after quite a while, and had some problems. First my user was erased somehow and I had to recreate the normal user (same name was used). I think that's taked care of, but could be related to this issue that I haven't been able to solve with the wiki and search engines. Here are the issues:

[sean@arch ~]$ systemctl --state=failed
  UNIT                 LOAD   ACTIVE SUB    DESCRIPTION
●ntpd.service         loaded failed failed Network Time Service
●polkit.service       loaded failed failed Authorization Manager
●rtkit-daemon.service loaded failed failed RealtimeKit Scheduling Policy Servic
●shadow.service       loaded failed failed Verify integrity of password and gro

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

4 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
[sean@arch ~]$ systemctl status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: failed (Result: start-limit) since Fri 2014-06-06 09:57:21 KST; 27min ago
  Process: 1657 ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid (code=exited, status=0/SUCCESS)
 Main PID: 1658 (code=exited, status=255)

Jun 06 09:57:20 arch systemd[1]: ntpd.service: main process exited, code=ex.../a
Jun 06 09:57:20 arch systemd[1]: Unit ntpd.service entered failed state.
Jun 06 09:57:21 arch systemd[1]: ntpd.service holdoff time over, scheduling...t.
Jun 06 09:57:21 arch systemd[1]: Stopping Network Time Service...
Jun 06 09:57:21 arch systemd[1]: Starting Network Time Service...
Jun 06 09:57:21 arch systemd[1]: ntpd.service start request repeated too qu...t.
Jun 06 09:57:21 arch systemd[1]: Failed to start Network Time Service.
Jun 06 09:57:21 arch systemd[1]: Unit ntpd.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
[sean@arch ~]$ systemctl status polkit
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: failed (Result: exit-code) since Fri 2014-06-06 09:57:32 KST; 28min ago
     Docs: man:polkit(8)
  Process: 1667 ExecStart=/usr/lib/polkit-1/polkitd --no-debug (code=exited, status=1/FAILURE)
 Main PID: 1667 (code=exited, status=1/FAILURE)

Jun 06 09:57:32 arch systemd[1]: Starting Authorization Manager...
Jun 06 09:57:32 arch systemd[1]: polkit.service: main process exited, code=...RE
Jun 06 09:57:32 arch systemd[1]: Failed to start Authorization Manager.
Jun 06 09:57:32 arch systemd[1]: Unit polkit.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
$ systemctl status rtkit-daemon
● rtkit-daemon.service - RealtimeKit Scheduling Policy Service
   Loaded: loaded (/usr/lib/systemd/system/rtkit-daemon.service; disabled)
   Active: failed (Result: exit-code) since Fri 2014-06-06 08:07:09 KST; 2h 19min ago
  Process: 998 ExecStart=/usr/lib/rtkit/rtkit-daemon (code=exited, status=1/FAILURE)
 Main PID: 998 (code=exited, status=1/FAILURE)

Jun 06 08:07:09 arch systemd[1]: rtkit-daemon.service: main process exited,...RE
Jun 06 08:07:09 arch systemd[1]: Unit rtkit-daemon.service entered failed state.
Jun 06 08:07:09 arch systemd[1]: Starting RealtimeKit Scheduling Policy Ser.....
Jun 06 08:07:09 arch rtkit-daemon[998]: Failed to find user 'rtkit'.
Jun 06 08:07:09 arch rtkit-daemon[998]: Demoting known real-time threads.
Jun 06 08:07:09 arch rtkit-daemon[998]: Demoted 0 threads.
Jun 06 08:07:09 arch systemd[1]: Started RealtimeKit Scheduling Policy Service.
Jun 06 08:07:09 arch systemd[1]: rtkit-daemon.service: main process exited,...RE
Jun 06 08:07:09 arch systemd[1]: Unit rtkit-daemon.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
]$ systemctl status shadow
● shadow.service - Verify integrity of password and group files
   Loaded: loaded (/usr/lib/systemd/system/shadow.service; static)
   Active: failed (Result: exit-code) since Fri 2014-06-06 08:03:59 KST; 2h 23min ago
  Process: 345 ExecStart=/usr/bin/pwck -r (code=exited, status=2)
 Main PID: 345 (code=exited, status=2)

Jun 06 08:04:00 arch pwck[345]: delete line 'polkitd:!:15818:0:99999:7:::'? No
Jun 06 08:04:00 arch pwck[345]: no matching password file entry in /etc/passwd
Jun 06 08:04:00 arch pwck[345]: delete line 'usbmux:!:15818:0:99999:7:::'? No
Jun 06 08:04:00 arch pwck[345]: no matching password file entry in /etc/passwd
Jun 06 08:04:00 arch pwck[345]: delete line 'ntp:!:15829:0:99999:7:::'? No
Jun 06 08:04:00 arch pwck[345]: no matching password file entry in /etc/passwd
Jun 06 08:04:00 arch pwck[345]: delete line 'rtkit:!:15836:0:99999:7:::'? No
Jun 06 08:04:00 arch pwck[345]: no matching password file entry in /etc/passwd
Jun 06 08:04:00 arch pwck[345]: delete line 'colord:!:16225:0:99999:7:::'? No
Jun 06 08:04:00 arch pwck[345]: pwck: no changes

I would be ever so grateful if someone could help this noob learn what the hell is going on, and how I possibly screwed up--and hopefully fix it. wink
Sorry if this is super ignorant, but I honestly can't figure out what I'm missing.

Thanks in advance!

Last edited by seanthor (2014-07-10 10:37:09)


Arch Linux 64-bit | Intel Core i7-6500U CPU @ 2.50GHz x 4 | RAM: 8 Gb | GNOME | Dualboot w/ Windows 10 | Razer Blade Stealth (1st gen.)

Offline

#2 2014-06-06 01:56:08

6ng4n
Member
Registered: 2012-02-07
Posts: 84

Re: systemctl errors after system upgrade [resolved]

First use -l option as stated in logs.I think your user config files are corrupted/deleted. Check the files below and whether they have any backups with .pacsave. If not your system is screwed, but it can be saved by reinstalling the releated packages such as systemd or polkit.

/etc/passwd
/etc/group
/etc/shadow
/etc/gshadow

Offline

#3 2014-06-06 03:42:14

seanthor
Member
Registered: 2013-08-18
Posts: 20

Re: systemctl errors after system upgrade [resolved]

They do not have any .pacsaves.

]$ systemctl -l status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: failed (Result: start-limit) since Fri 2014-06-06 12:26:30 KST; 9min ago
  Process: 373 ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid (code=exited, status=0/SUCCESS)
 Main PID: 374 (code=exited, status=255)

Jun 06 12:26:30 arch systemd[1]: Unit ntpd.service entered failed state.
Jun 06 12:26:30 arch systemd[1]: ntpd.service holdoff time over, scheduling restart.
Jun 06 12:26:30 arch systemd[1]: Stopping Network Time Service...
Jun 06 12:26:30 arch systemd[1]: Starting Network Time Service...
Jun 06 12:26:30 arch systemd[1]: ntpd.service start request repeated too quickly, refusing to start.
Jun 06 12:26:30 arch systemd[1]: Failed to start Network Time Service.
Jun 06 12:26:30 arch systemd[1]: Unit ntpd.service entered failed state.
]$ systemctl -l status polkit
● polkit.service - Authorization Manager
   Loaded: loaded (/usr/lib/systemd/system/polkit.service; static)
   Active: failed (Result: exit-code) since Fri 2014-06-06 12:28:37 KST; 8min ago
     Docs: man:polkit(8)
  Process: 863 ExecStart=/usr/lib/polkit-1/polkitd --no-debug (code=exited, status=1/FAILURE)
 Main PID: 863 (code=exited, status=1/FAILURE)

Jun 06 12:28:37 arch systemd[1]: polkit.service: main process exited, code=exited, status=1/FAILURE
Jun 06 12:28:37 arch systemd[1]: Failed to start Authorization Manager.
Jun 06 12:28:37 arch systemd[1]: Unit polkit.service entered failed state.
$ systemctl -l status rtkit-daemon
● rtkit-daemon.service - RealtimeKit Scheduling Policy Service
   Loaded: loaded (/usr/lib/systemd/system/rtkit-daemon.service; disabled)
   Active: failed (Result: exit-code) since Fri 2014-06-06 12:29:35 KST; 8min ago
  Process: 918 ExecStart=/usr/lib/rtkit/rtkit-daemon (code=exited, status=1/FAILURE)
 Main PID: 918 (code=exited, status=1/FAILURE)

Jun 06 12:29:35 arch systemd[1]: rtkit-daemon.service: main process exited, code=exited, status=1/FAILURE
Jun 06 12:29:35 arch systemd[1]: Unit rtkit-daemon.service entered failed state.
Jun 06 12:29:35 arch systemd[1]: Starting RealtimeKit Scheduling Policy Service...
Jun 06 12:29:35 arch rtkit-daemon[918]: Failed to find user 'rtkit'.
Jun 06 12:29:35 arch rtkit-daemon[918]: Demoting known real-time threads.
Jun 06 12:29:35 arch rtkit-daemon[918]: Demoted 0 threads.
Jun 06 12:29:35 arch systemd[1]: Started RealtimeKit Scheduling Policy Service.
Jun 06 12:29:35 arch systemd[1]: rtkit-daemon.service: main process exited, code=exited, status=1/FAILURE
Jun 06 12:29:35 arch systemd[1]: Unit rtkit-daemon.service entered failed state.
$ systemctl -l status shadow
● shadow.service - Verify integrity of password and group files
   Loaded: loaded (/usr/lib/systemd/system/shadow.service; static)
   Active: inactive (dead)

Sorry for forgetting the "-l" option. So just reinstalling systemd and polkit should fix it all?


Arch Linux 64-bit | Intel Core i7-6500U CPU @ 2.50GHz x 4 | RAM: 8 Gb | GNOME | Dualboot w/ Windows 10 | Razer Blade Stealth (1st gen.)

Offline

#4 2014-06-06 04:08:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: systemctl errors after system upgrade [resolved]

No, you need to fix the conflicts in your passwd file. Have you merged the pacnews from the filesystem upgrade?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-06-06 04:38:20

seanthor
Member
Registered: 2013-08-18
Posts: 20

Re: systemctl errors after system upgrade [resolved]

Yes, I've merged the pacnews without any glaring problems (I've been able to find).

How do I fix the conflicts in the passwd file if I'm unable to even locate/identify them? Sorry to be frustrating, but I'm not following you, jasonwryan.


Arch Linux 64-bit | Intel Core i7-6500U CPU @ 2.50GHz x 4 | RAM: 8 Gb | GNOME | Dualboot w/ Windows 10 | Razer Blade Stealth (1st gen.)

Offline

#6 2014-06-06 05:19:50

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: systemctl errors after system upgrade [resolved]

The error messages prompted you to use the relevant commands for the fix. See `man pwck`.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2014-06-10 12:37:54

seanthor
Member
Registered: 2013-08-18
Posts: 20

Re: systemctl errors after system upgrade [resolved]

Ok, so I reinstalled polkit & systemd and ran pwck, answering affirmitively for all answers. Now I rebooted and ran pwck again, with no output. However, I still have these errors:

]$ systemctl --state=failed
  UNIT                 LOAD   ACTIVE SUB    DESCRIPTION
●ntpd.service         loaded failed failed Network Time Service
●rtkit-daemon.service loaded failed failed RealtimeKit Scheduling Policy Servic

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

2 loaded units listed. Pass --all to see loaded but inactive units, too.
To show all installed unit files use 'systemctl list-unit-files'.
$ systemctl -l status ntpd
● ntpd.service - Network Time Service
   Loaded: loaded (/usr/lib/systemd/system/ntpd.service; enabled)
   Active: failed (Result: start-limit) since Tue 2014-06-10 21:26:14 KST; 7min ago
  Process: 371 ExecStart=/usr/bin/ntpd -g -u ntp:ntp -p /run/ntpd.pid (code=exited, status=0/SUCCESS)
 Main PID: 372 (code=exited, status=255)

Jun 10 21:26:13 arch systemd[1]: Unit ntpd.service entered failed state.
Jun 10 21:26:14 arch systemd[1]: ntpd.service holdoff time over, scheduling restart.
Jun 10 21:26:14 arch systemd[1]: Stopping Network Time Service...
Jun 10 21:26:14 arch systemd[1]: Starting Network Time Service...
Jun 10 21:26:14 arch systemd[1]: ntpd.service start request repeated too quickly, refusing to start.
Jun 10 21:26:14 arch systemd[1]: Failed to start Network Time Service.
Jun 10 21:26:14 arch systemd[1]: Unit ntpd.service entered failed state.
]$ systemctl -l status rtkit-daemon
● rtkit-daemon.service - RealtimeKit Scheduling Policy Service
   Loaded: loaded (/usr/lib/systemd/system/rtkit-daemon.service; disabled)
   Active: failed (Result: exit-code) since Tue 2014-06-10 21:29:20 KST; 5min ago
  Process: 1047 ExecStart=/usr/lib/rtkit/rtkit-daemon (code=exited, status=1/FAILURE)
 Main PID: 1047 (code=exited, status=1/FAILURE)

Jun 10 21:29:19 arch systemd[1]: rtkit-daemon.service: main process exited, code=exited, status=1/FAILURE
Jun 10 21:29:19 arch systemd[1]: Unit rtkit-daemon.service entered failed state.
Jun 10 21:29:19 arch systemd[1]: Starting RealtimeKit Scheduling Policy Service...
Jun 10 21:29:20 arch systemd[1]: Started RealtimeKit Scheduling Policy Service.
Jun 10 21:29:20 arch rtkit-daemon[1047]: Failed to find user 'rtkit'.
Jun 10 21:29:20 arch rtkit-daemon[1047]: Demoting known real-time threads.
Jun 10 21:29:20 arch rtkit-daemon[1047]: Demoted 0 threads.
Jun 10 21:29:20 arch systemd[1]: rtkit-daemon.service: main process exited, code=exited, status=1/FAILURE
Jun 10 21:29:20 arch systemd[1]: Unit rtkit-daemon.service entered failed state.

Will simply reinstalling these packages solve the issue, or is there still an issue with my user permissions, of which this is only a single symptom that needs another remedy?


Arch Linux 64-bit | Intel Core i7-6500U CPU @ 2.50GHz x 4 | RAM: 8 Gb | GNOME | Dualboot w/ Windows 10 | Razer Blade Stealth (1st gen.)

Offline

#8 2014-06-10 14:22:13

loqs
Member
Registered: 2014-03-06
Posts: 19,184

Re: systemctl errors after system upgrade [resolved]

For rtkit rtkit
post_upgrade calls post_install and will add missing user/group entries so a reinstall should work for rtkit

post_install() {
  getent group rtkit &>/dev/null || /usr/sbin/groupadd -g 133 rtkit || return 1
  getent passwd rtkit &>/dev/null || /usr/sbin/useradd -u 133 -g rtkit -c 'RealtimeKit' -s /sbin/nologin -d /proc rtkit || return 1

  dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesktop.DBus.ReloadConfig >/dev/null 2>&1

  true
}

post_upgrade() {
  if (( $(vercmp $2 0.10) < 0 )); then
    # Get rid of old user and group
    post_remove
  fi

  post_install
}

for ntp ntp

post_install() {
	getent group ntp &>/dev/null || groupadd -g 87 ntp >/dev/null
	getent passwd ntp &>/dev/null || useradd -u 87 -g ntp -d /var/lib/ntp -c 'Network Time Protocol' -s /bin/false ntp >/dev/null
	true
}

There is no post_upgrade so you would need to remove and then re install ntp or run the two commands manually to add the user and group back ( the genent call guards against duplicate entry creation )

Offline

#9 2014-06-12 01:52:10

seanthor
Member
Registered: 2013-08-18
Posts: 20

Re: systemctl errors after system upgrade [resolved]

for ntp: so would I just

#usermod -aG ntp [username] 

and

# gpasswd -a [user] ntp 

and voila?


Arch Linux 64-bit | Intel Core i7-6500U CPU @ 2.50GHz x 4 | RAM: 8 Gb | GNOME | Dualboot w/ Windows 10 | Razer Blade Stealth (1st gen.)

Offline

#10 2014-06-12 02:23:26

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: systemctl errors after system upgrade [resolved]

Typically if you mess up these files somehow, the system automatically makes backups of them.  So they will be /etc/passwd- /etc/shadow- and /etc/group-.  Move those into place and things should work again. 

I'm not sure at what point the system decides to make these backups, but I would imagine that if you wait too long, they will eventually be overwritten by your now wonky files.  I might be wrong about that though...

Offline

#11 2014-06-12 04:40:18

seanthor
Member
Registered: 2013-08-18
Posts: 20

Re: systemctl errors after system upgrade [resolved]

So from the start I should've only moved these backups to replace the active files? Good to know.

But I already remade my user w/ a different password, then reinstalled yhe other files. So it's too late to replace tjese files with the backups, yes?

Ps I


Arch Linux 64-bit | Intel Core i7-6500U CPU @ 2.50GHz x 4 | RAM: 8 Gb | GNOME | Dualboot w/ Windows 10 | Razer Blade Stealth (1st gen.)

Offline

#12 2014-07-10 10:36:25

seanthor
Member
Registered: 2013-08-18
Posts: 20

Re: systemctl errors after system upgrade [resolved]

Soo its been a while, but I'll wrap up this thread. I ended up simply removing and reinstalling ntp w/ pacman (pretty painless), and no longer get any failed processes on start up. So it appears all the issues have been resolved. Thanks again to all for you time, patience and effort.

Big Love!


Arch Linux 64-bit | Intel Core i7-6500U CPU @ 2.50GHz x 4 | RAM: 8 Gb | GNOME | Dualboot w/ Windows 10 | Razer Blade Stealth (1st gen.)

Offline

Board footer

Powered by FluxBB