一、问题描述
最近同事反馈使用工具连接一台服务器的时候非常卡,两三分钟后也能正常连接
系统日志:/var/log/message
systemd-logind[12321]: Failed to enable subscription: Activation of org.freedesktop.systemd1 timed out
dbus[897]: [system] Failed to activate service 'org.freedesktop.systemd1': timed out
systemd-logind[12321]: Failed to enable subscription: Connection timed out
尝试重启systemd-logind
systemctl restart systemd-logind
直接报错:
Failed to enable subscription: Activation of org.freedesktop.systemd1 timed out
Failed to enable subscription: Connection timed out
查看dbus状态
systemctl status dbus
也是大量报错:
Failed to activate service 'org.freedesktop.systemd1': timed out
二、解决办法
根据网上说法dbus存在bug,重启即可解决问题
reboot
如果报错就强制重启:reboot -f
但是服务器跑着大量业务,根本没法重启机器
尝试重启dbus服务
systemctl restart dbus
重启成功
尝试重启systemd-logind服务
systemctl restart systemd-logind
重启成功
尝试新打开窗口连接服务器,缓慢问题解决