首页/系统/信创系统运维速查/failed 单元排查与复位
服务与运维65 条

failed 单元排查与复位

服务启动失败会进入 failed 状态:systemctl --failed 列出全部失败单元,reset-failed 清理失败计数与标记,配合 status 与 journalctl 定位根因。

信创系统运维速查系统更新于 2026-10-12
列出失败单元systemctl --failed
复位计数systemctl reset-failed [单元]
定位方式status 摘要 + journalctl -u 详细日志

排查流程

排查流程
systemctl --failed
systemctl status myapp.service -l --no-pager
journalctl -u myapp.service -n 100 --no-pager
systemctl reset-failed myapp.service
reset-failed 只是清掉失败标记与重启计数,不修复根因;清完要再 start 并观察是否复发。

易错点

  • 服务反复失败触发重启限速后 systemd 不再拉起,需先修根因再 reset-failed 后启动
  • status 摘要里的 'Process: ... ExecStart=... (code=exited, status=...)' 行是找原因的关键,先看它再去日志

数据来源与参考

  • man 1 systemctl(--failed/reset-failed)
  • openEuler 文档:systemd 常见问题
​‌‌​​‌​​​‌‌​‌‌‌‌​‌‌​​​‌‌​‌‌‌​​‌‌​​‌​‌‌‌​​‌‌‌​​​‌​‌‌​‌​​‌​‌‌‌​​​‌​‌‌​‌​​‌​‌‌​​​‌‌​‌‌‌​‌​​​‌‌​‌‌‌‌​​‌​‌‌‌​​‌‌​​​‌‌​‌‌​‌‌‌‌​‌‌​‌‌​‌