强制重启 systemd-logind.service

强制重启 systemd-logind.service

我在一台服务器上使用 ssh 登录时遇到问题,连接时间太长。我之前在另一台服务器上也遇到过同样的情况,重新启动 systemd-logind.service 就可以了。

我尝试在此服务器上执行相同操作,但无法重新启动后出现此信息。

#  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 -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

我甚至无法杀死-9该进程。

如果我尝试重新开始

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

相关内容