Linux

匯流排:y_時間___s是s噸和米system無法啟動服務“org.freedesktop.login1”:超時

  • March 15, 2020

我在其中一台伺服器的系統日誌中不斷收到以下錯誤消息:

# tail /var/log/syslog
Oct 29 13:48:40 myserver dbus[19617]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Oct 29 13:48:40 myserver dbus[19617]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Oct 29 13:49:05 myserver dbus[19617]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Oct 29 13:49:05 myserver dbus[19617]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'

它們似乎與 ProFTPd 守護程序上的 FTP 登錄相關:

# tail /var/log/proftpd/proftpd.log
2015-10-29 13:48:40,433 myserver proftpd[17872] myserver.example.com (remote.example.com[192.168.22.33]): USER switch: Login successful.
2015-10-29 13:48:40,460 myserver proftpd[17872] myserver.example.com (remote.example.com[192.168.22.33]): FTP session closed.
2015-10-29 13:48:40,664 myserver proftpd[17881] myserver.example.com (remote.example.com[192.168.22.33]): FTP session opened.
2015-10-29 13:49:05,687 myserver proftpd[17881] myserver.example.com (remote.example.com[192.168.22.33]): USER switch: Login successful.
2015-10-29 13:49:05,705 myserver proftpd[17881] myserver.example.com (remote.example.com[192.168.22.33]): FTP session closed.
2015-10-29 13:49:05,908 myserver proftpd[17915] myserver.example.com (remote.example.com[192.168.22.33]): FTP session opened.

不過,FTP 登錄本身似乎對使用者來說沒有問題。我還有幾台其他伺服器也在執行 ProFTPd,但到目前為止從未出現這些錯誤。

不過,它們可能與最近從 Debian 7 升級到 Debian 8 有關。

有什麼想法想告訴我什麼資訊,甚至是什麼原因造成的?

我已經嘗試重新啟動 dbus 和 proftpd 守護程序甚至伺服器,並確保 DBUS 套接字 /var/run/dbus/system_bus_socket 存在,但到目前為止消息不斷出現。

編輯:評論中要求的 journalctl 的輸出:

root@myserver:/home/chammers# systemctl status -l dbus-org.freedesktop.login1.service
● systemd-logind.service - Login Service
  Loaded: loaded (/lib/systemd/system/systemd-logind.service; static)
  Active: active (running) since Tue 2015-10-27 13:23:32 CET; 1 weeks 0 days 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
Main PID: 467 (systemd-logind)
  Status: "Processing requests..."
  CGroup: /system.slice/systemd-logind.service
          └─467 /lib/systemd/systemd-logind

Oct 28 10:15:25 myserver systemd-logind[467]: New session c3308 of user switch.
Oct 28 10:15:25 myserver systemd-logind[467]: Removed session c3308.
Oct 28 10:15:25 myserver systemd-logind[467]: New session c3309 of user switch.
Oct 28 10:15:25 myserver systemd-logind[467]: Removed session c3309.
Oct 28 10:15:25 myserver systemd-logind[467]: New session c3310 of user switch.
Oct 28 10:15:25 myserver systemd-logind[467]: Removed session c3310.
Oct 28 10:15:25 myserver systemd-logind[467]: New session c3311 of user switch.
Oct 28 10:15:25 myserver systemd-logind[467]: Removed session c3311.
Oct 28 10:19:52 myserver systemd-logind[467]: New session 909 of user chammers.
Oct 28 10:27:11 myserver systemd-logind[467]: Failed to abandon session scope: Transport endpoint is not connected

還有更多的 journalctl 輸出:

Nov 03 16:21:19 myserver dbus[19617]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Nov 03 16:21:19 myserver proftpd[23417]: pam_systemd(proftpd:session): Failed to create session: Activation of org.freedesktop.login1 timed out
Nov 03 16:21:19 myserver proftpd[23418]: pam_systemd(proftpd:session): Failed to create session: Activation of org.freedesktop.login1 timed out
Nov 03 16:21:19 myserver proftpd[23417]: pam_unix(proftpd:session): session closed for user switch
Nov 03 16:21:19 myserver proftpd[23418]: pam_unix(proftpd:session): session closed for user switch
Nov 03 16:21:19 myserver proftpd[23420]: pam_unix(proftpd:session): session opened for user switch by (uid=0)
Nov 03 16:21:19 myserver dbus[19617]: [system] Activating via systemd: service name='org.freedesktop.login1' unit='dbus-org.freedesktop.login1.service'
Nov 03 16:21:19 myserver proftpd[23421]: pam_unix(proftpd:session): session opened for user switch by (uid=0)

重啟登錄:

# systemctl restart systemd-logind

請注意,重新啟動 dbus 會再次斷開它們的連接。

重新啟動是唯一對我有用的解決方案。我殺死了失控的 dbus 程序,其他事情都失敗了。

這就是我嘗試重新載入 httpd 時發生的事情-

Error getting authority: Error initializing authority: Error calling StartServiceByName for org.freedesktop.PolicyKit1: GDBus.Error:org.freedesktop.DBus.Error.TimedOut: Activation of org.freedesktop.PolicyKit1 timed out (g-dbus-error-quark, 20)
Failed to reload httpd.service: Connection timed out

Centos7 有問題。

引用自:https://unix.stackexchange.com/questions/239489