20.04 LTS 无法启动:systemd-logind.service 无法将 stdout 连接到日志套接字,并且启动过程中出现大量故障

20.04 LTS 无法启动:systemd-logind.service 无法将 stdout 连接到日志套接字,并且启动过程中出现大量故障

幸运的是,我有一个 Ubuntu 20.04 服务器的快照,因为当我重新启动它时,在启动过程中我看到许多服务出现故障,然后挂在 systemd-logind 上。服务无法将 stdout 连接到日志套接字。

启动期间的错误:

在此处输入图片描述

启动后挂在这里:

在此处输入图片描述

如果我回滚到快照(重新启动之前并且它仍然有效):

Syslog显示:

Feb 01 16:46:31 socwk multipathd[748]: sda: failed to get udev uid: Invalid argument
Feb 01 16:46:31 socwk multipathd[748]: sda: failed to get sysfs uid: Invalid argument
Feb 01 16:46:31 socwk multipathd[748]: sda: failed to get sgio uid: No such file or directory

systemctl 给出:

● fwupd-refresh.service                                                                            loaded failed failed    Refresh fwupd metadata and update motd  
systemd-hostnamed.service                                                                        loaded failed failed    Hostname Service   

如果我在重新启动之前尝试安装更新,我会收到以下错误:

Installing new version of config file /etc/systemd/resolved.conf ...
Job for systemd-networkd.service failed because the control process exited with error code.
See "systemctl status systemd-networkd.service" and "journalctl -xe" for details.
Job for systemd-resolved.service failed.
See "systemctl status systemd-resolved.service" and "journalctl -xe" for details.
Job for systemd-journald.service failed.
See "systemctl status systemd-journald.service" and "journalctl -xe" for details.
Setting up netplan.io (0.101-0ubuntu3~20.04.2) ...
Setting up systemd-timesyncd (245.4-4ubuntu3.4) ...
Job for systemd-timesyncd.service failed.

和:

Errors were encountered while processing:
 udev
 mdadm
 ubuntu-drivers-common
 ubuntu-minimal

我真的不知道从哪里开始尝试解决这个问题。

答案1

此问题可能是由于根目录 / 所有权或权限发生变化而导致的。它通常(至少在 Ubuntu 下)应由 root:root 拥有,且权限为 755。如果这是错误的,您可以使用以下方法进行更改

chown root:root / && chmod 755 /

然后重新启动。

相关内容