Force restart of systemd-logind.service

2

1

I'm having trouble login using ssh on one server, the connection takes too long. I have had the same situation before on a different server and restarting systemd-logind.service worked.

I tried to do the same on this server but it says this after been unable to restart.

#  service  systemd-logind status
Redirecting to /bin/systemctl status  systemd-logind.service
● systemd-logind.service - Login Service
Loaded: loaded (/usr/lib/systemd/system/systemd-logind.service; static; 
 vendor preset: disabled)
   Active: failed (Result: timeout) since Thu 2018-10-25 16:48:50 CST; 1min 16s ago
     Docs: man:systemd-logind.service(8)
           man:logind.conf(5)
           http://www.freedesktop.org/wiki/Software/systemd/logind
           http://www.freedesktop.org/wiki/Software/systemd/multiseat
  Process: 90429 ExecStart=/usr/lib/systemd/systemd-logind (code=exited, status=1/FAILURE)
 Main PID: 90429 (code=exited, status=1/FAILURE)
   Status: "Shutting down..."
   CGroup: /system.slice/systemd-logind.service
           └─1037 /usr/lib/systemd/systemd-logind

Oct 25 16:42:49 HOST systemd[1]: Starting Login Service...
Oct 25 16:42:49 HOST systemd-logind[90429]: Failed to register name: File exists
Oct 25 16:42:49 HOST systemd[1]: systemd-logind.service: main process exited, code=exited, status=1/FAILURE
Oct 25 16:44:19 HOST systemd[1]: systemd-logind.service stop-sigterm timed out. Killing.
Oct 25 16:45:50 HOST systemd[1]: systemd-logind.service still around after SIGKILL. Ignoring.
Oct 25 16:47:20 HOST systemd[1]: systemd-logind.service stop-final-sigterm timed out. Killing.
Oct 25 16:48:50 HOST systemd[1]: systemd-logind.service still around after final SIGKILL. Entering failed mode.
Oct 25 16:48:50 HOST systemd[1]: Stopped Login Service.
Oct 25 16:48:50 HOST systemd[1]: Unit systemd-logind.service entered failed state.
Oct 25 16:48:50 HOST systemd[1]: systemd-logind.service failed.

Uname

# uname -a
Linux HOST 3.10.0-514.el7.x86_64 #1 SMP Wed Oct 19 11:24:13 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux

I can't even kill -9 the process.

And if I just try to restart

SYSTEMD_LOG_LEVEL=debug /usr/lib/systemd/systemd-logind
Failed to determine peer security context: Protocol not available
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=Hello cookie=1 reply_cookie=0 error=n/a
Got message type=method_return sender=org.freedesktop.DBus estination=:1.32483949 object=n/a interface=n/a member=n/a cookie=1 reply_cookie=1 error=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch cookie=2 reply_cookie=0 error=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch cookie=3 reply_cookie=0 error=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch cookie=4 reply_cookie=0 error=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch cookie=5 reply_cookie=0 error=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=AddMatch cookie=6 reply_cookie=0 error=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.systemd1 object=/org/freedesktop/systemd1 interface=org.freedesktop.systemd1.Manager member=Subscribe cookie=7 reply_cookie=0 error=n/a
Sent message type=method_call sender=n/a destination=org.freedesktop.DBus object=/org/freedesktop/DBus interface=org.freedesktop.DBus member=RequestName cookie=8 reply_cookie=0 error=n/a
Failed to register name: File exists
Failed to fully start up daemon: File exists

Hohenheimsenberg

Posted 2018-10-25T23:04:54.100

Reputation: 121

Have you already rebooted the Linux machine? If not, consider doing it before chasing ghosts just in case a solution is simple as that. – Pimp Juice IT – 2018-10-25T23:35:36.960

No answers