服务无法正常启动显示“failed to activate service 'org.freedesktop.systemd1' timed out’”

一个dockercompose的服务,服务无法拉起报错显示

failed to activate service 'org.freedesktop.systemd1' timed out

image.png

根据错误信息,发现其他的systemd的服务也无法正常启用
经过查询引起的原因应该是systemd 服务崩溃,原因是用户session 舍弃的过多导致
systemd version 42.17e cannot handle too many sessions at once according to red hat global support. It ran out of memorey and futhermore crashed the modules org.freedesktop.logind and org.freedesktop.systemd.
This issue can happen because of "abandoned" user session. You can check with the command -- $ systemctl | grep 'of user'| grep 'abandoned'
可以通过以下指令来查看“被舍弃的”进程:

systemctl | grep 'of user'| grep 'abandoned'

解决方式

 rm -rf /run/systemd/system/sessionscope   ##删除用户session 目录
systemctl daemon-reexec   ##reload systemd

以上如果不生效,重启大法好

reboot
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容