AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1241017
Accepted
tuk
tuk
Asked: 2020-05-19 07:06:55 +0800 CST2020-05-19 07:06:55 +0800 CST 2020-05-19 07:06:55 +0800 CST

无法激活服务“org.freedesktop.systemd1”:超时

  • 772

在 ubuntu 16.04.6 上尝试屏蔽 systemd 服务。我看到如下错误。

systemctl mask hadoop-hdfs-zkfc.service
Failed to activate service 'org.freedesktop.systemd1': timed out

我使用的是 Ubuntu 16.04.6 附带的默认 systemd 版本。

ubuntu@platform1:~$ systemctl --version
systemd 229
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP
+LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS
+KMOD -IDN

问题并不总是出现。但是一旦遇到这个问题,恢复 systemd 的唯一方法就是硬重启。

查看系统日志,它似乎 systemd 已中止。

May 18 08:49:24 platform3 systemd[1]: Removed slice User Slice of support.
May 18 08:49:27 platform3 systemd[1]: Assertion 's->type ==
SERVICE_ONESHOT' failed at ../src/core/service.c:1792, function
service_enter_start(). Aborting.
May 18 08:49:27 platform3 systemd[1]: Caught <ABRT>, dumped core as pid 15839.
May 18 08:49:27 platform3 systemd[1]: Freezing execution. 

busctl输出如下所示

ubuntu@platform3:~/logs$ busctl
NAME                               PID PROCESS         USER             CONNECTION    UNIT                      SESSION    DESCRIPTION
:1.1                               976 systemd-logind  root             :1.1          systemd-logind.service    -          -
:1.3                               971 accounts-daemon root             :1.3          accounts-daemon.service   -          -
:1.5434                          49174 systemctl       root             :1.5434       cron.service              -          -
:1.5435                          49223 systemctl       root             :1.5435       ssh.service               -          -
:1.5436                          49408 busctl          ubuntu           :1.5436       ssh.service               -          -
:1.7                              1109 unattended-upgr root             :1.7          unattended-upgrades.se... -          -
com.ubuntu.LanguageSelector          - -               -                (activatable) -                         -
org.debian.AptXapianIndex            - -               -                (activatable) -                         -
org.freedesktop.Accounts           971 accounts-daemon root             :1.3          accounts-daemon.service   -          -
org.freedesktop.DBus               936 dbus-daemon     messagebus       org.freedesktop.DBus dbus.service              -          -
org.freedesktop.hostname1            - -               -                (activatable) -                         -
org.freedesktop.locale1              - -               -                (activatable) -                         -
org.freedesktop.login1             976 systemd-logind  root             :1.1          systemd-logind.service    -          -
org.freedesktop.network1             - -               -                (activatable) -                         -
org.freedesktop.resolve1             - -               -                (activatable) -                         -
org.freedesktop.systemd1             - -               -                (activatable) -                         -
org.freedesktop.thermald             - -               -                (activatable) -                         -
org.freedesktop.timedate1            - -               -                (activatable) -                         - 

有人可以告诉我,如何调试吗?

该问题看起来与此处讨论的问题相似。那么这是 Ubuntu 16.04.6 上一些已知的 systemd 问题吗?

init systemd 16.04
  • 2 2 个回答
  • 27313 Views

2 个回答

  • Voted
  1. folivore
    2020-08-14T23:07:05+08:002020-08-14T23:07:05+08:00

    从您上面发布的 busctl 调用的输出中可以清楚地看出,您的org.freedesktop.systemd1守护程序(init.scope单元)实际上并未处于活动状态:

    org.freedesktop.systemd1             - -               -                (activatable) -                         -
    

    但是它可能会像这样被激活:

    $ systemctl daemon-reexec
    

    或这个:

    $ sudo kill 1
    

    这应该以更坚持的方式询问 systemd - 通过向 systemd 发送 SIGTERM 信号,基本上做同样的事情 - 运行 daemon-reexec。在耗尽所有可用 RAM 而系统上没有交换文件后,我遇到了一个相似的问题。并且重新执行 systemd 守护程序完全为我解决了它,而无需重新启动机器(尽管在此之前,如果问题与我的情况相同,您需要杀死一些用户进程以释放一些 RAM)。正如它在 systemd 的手册页中所述,daemon-reexec 可以保存使用:

       daemon-reexec
           Reexecute the systemd manager. This will serialize the manager
           state, reexecute the process and deserialize the state again. This
           command is of little use except for debugging and package upgrades.
           Sometimes, it might be helpful as a heavy-weight daemon-reload.
           While the daemon is being reexecuted, all sockets systemd listening
           on behalf of user configuration will stay accessible.
    
    • 3
  2. Best Answer
    tuk
    2020-05-22T07:41:00+08:002020-05-22T07:41:00+08:00

    这已在 systemd 邮件列表中得到解答。交叉发布答案

    此错误(https://github.com/systemd/systemd/issues/4444)已在 systemd v236 中修复。

    看看你是否可以使用更新版本的 systemd。

    • 1

相关问题

  • 来自 dropbear 的 init premount 脚本错误

  • Live CD 内核恐慌

  • /etc/init/ 和 /etc/init.d/ 有什么区别?

  • 什么是新贵?

  • 命令列出启动时启动的服务?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve