dbus 无法手动启动?

dbus 无法手动启动?

当我检查 ssh 状态时:

sudo systemctl status sshd

它返回:

● ssh.service - OpenBSD Secure Shell server
   Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2022-01-06 10:00:46 UTC; 16h ago
  Process: 14197 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
 Main PID: 14198 (sshd)
    Tasks: 21 (limit: 6143)
   CGroup: /system.slice/ssh.service
           ├─ 7177 containerd-shim -namespace moby -workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux
           ├─10683 dbus-daemon --system
           ├─10743 /lib/systemd/systemd-logind
           ├─11794 dbus-daemon --system
           ├─11812 dbus-daemon --system
           ├─14198 /usr/sbin/sshd -D
           ├─15483 sshd: boe [priv]
           ├─15712 sshd: boe@pts/0
           ├─15713 /bin/bash -l
           ├─15729 sudo systemctl status sshd
           ├─15730 systemctl status sshd
           └─15731 pager

Jan 07 02:05:38 boe sshd[15294]: Received disconnect from 10.13.61.106 port 63245:11: disconnected by user
Jan 07 02:05:38 boe sshd[15294]: Disconnected from user boe 10.13.61.106 port 63245
Jan 07 02:28:05 boe sshd[15483]: Accepted password for boe from 10.13.61.106 port 63906 ssh2
Jan 07 02:28:05 boe sshd[15483]: pam_unix(sshd:session): session opened for user boe by (uid=0)
Jan 07 02:28:05 boe sshd[15483]: pam_systemd(sshd:session): Failed to connect to system bus: Connection refused
Jan 07 02:28:05 boe sshd[15483]: pam_limits(sshd:session): unknown limit item 'noproc'
Jan 07 02:28:05 boe sshd[15483]: pam_limits(sshd:session): unknown limit item 'noproc'
Jan 07 02:28:43 boe sudo[15729]: pam_unix(sudo:auth): authentication failure; logname=boe uid=1000 euid=0 tty=/dev/pts/0 rus
Jan 07 02:28:48 boe sudo[15729]:      boe : TTY=pts/0 ; PWD=/home/boe ; USER=root ; COMMAND=/bin/systemctl status sshd
Jan 07 02:28:48 boe sudo[15729]: pam_unix(sudo:session): session opened for user root by boe(uid=0)

它包含

无法连接到系统总线:连接被拒绝

然后我检查dbus:

sudo systemctl status dbus

● dbus.service - D-Bus System Message Bus
   Loaded: loaded (/lib/systemd/system/dbus.service; static; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:dbus-daemon(1)

为什么它没有自动启动?我试过启动它

sudo systemctl start dbus.service

Failed to start dbus.service: Operation refused, unit dbus.service may be requested by dependency only (it is configured to refuse manual start/stop).
See system logs and 'systemctl status dbus.service' for details.

出了什么问题?

答案1

我在 Mint 中遇到了非常类似的问题,我也无法手动启动 dbus。我没有解决这个问题,因为我弄清楚了导致 dbus 无法自动启动的原因。因此,如果有人遇到类似的问题:

我们systemctl --failed可以观察到哪些(其他)服务启动失败。解决这些问题就解决了 dbus 问题。

相关内容