大网数据广告活动
服务器运维问答

systemctl --user: Process org.freedesktop.systemd1 exited with status 1

· 52CE 我爱测

The box is a debian stable (stretch as of now). The problem I encountered is that systemctl can't query user service manager. For command, systemctl --user The error message is: Failed to list units: Process org.freedesktop.syste…

问题原文

原帖链接 · Gang Liang · CC BY-SA 3.0

The box is a debian stable (stretch as of now). The problem I encountered is that systemctl can't query user service manager. For command,

systemctl --user

The error message is:

Failed to list units: Process org.freedesktop.systemd1 exited with status 1

For command

systemctl --user status

The error message is:

Failed to read server status: Input/output error

On the other hand, everything looks fine that there is no failed service, and [email omitted] is working as expected. Basically, all user units are running normally, yet I can't interact with them through the systemctl interface.

Many people had similar symptoms yet all with different issues. Tried to reboot the machine but it didn't help.

My question is: how should I debug the user systemctl session? The information above is too generic to pinpoint the actual problem.

Thanks in advance.

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 3.0

Please check the environment variable XDG_RUNTIME_DIR is defined and is equal to /run/user/$(id -u). If it is not, then define it as such and try again.

export XDG_RUNTIME_DIR=/run/user/$(id -u)

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-12-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。