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 / 问题 / 1229277
Accepted
samirbajaj
samirbajaj
Asked: 2020-04-22 15:28:55 +0800 CST2020-04-22 15:28:55 +0800 CST 2020-04-22 15:28:55 +0800 CST

引导期间的错误消息

  • 772

我最近对我的 18.04 LTS 安装应用了一些软件更新,现在我在重新启动期间看到以下内容:

$ cat /var/log/boot.log  Scanning for Btrfs filesystems UBUNTU: clean, 700970/30883840 files, 21610032/123523840 blocks [  OK  ] Found device /sys/subsystem/net/devices/br0. [  OK  ] Started ifup for br0.
         Starting Network Manager Script Dispatcher Service... [  OK  ]
         Starting Virtualization daemon...
         Starting Permit User Sessions...
         Starting containerd container runtime...
         Starting OpenBSD Secure Shell server... [  OK  ] 
         Reached target Network is Online.
         Starting Message of the Day...
         Starting Docker Application Container Engine...
         Starting Hold until boot process finishes up...
         Starting GNOME Display Manager... 

         [  OK  ] Created slice User Slice of root. 
         [FAILED] Failed to start Session c2 of user root. See 'systemctl status session-c2.scope' for details. 
         [FAILED] Failed to start Session c7 of user root. See 'systemctl status session-c7.scope' for details. 
         [FAILED] Failed to start Session c4 of user root. See 'systemctl status session-c4.scope' for details. 
         [FAILED] Failed to start Session c3 of user root. See 'systemctl status session-c3.scope' for details. 
         [  OK  ] Started Session c11 of user root.
         Starting User Manager for UID 0... 
         [FAILED] Failed to start Session c5 of user root. See ....

systemctl 有以下说法:

$ systemctl status session-c2.scope
● session-c2.scope - Session c2 of user root
   Loaded: loaded (/run/systemd/transient/session-c2.scope; transient)
Transient: yes
   Active: failed (Result: resources)

Apr 21 15:50:53 dell systemd[1]: session-c2.scope: Failed to add PIDs to scope's control group: No such process
Apr 21 15:50:53 dell systemd[1]: session-c2.scope: Failed with result 'resources'.
Apr 21 15:50:53 dell systemd[1]: Failed to start Session c2 of user root.

其他有用信息:

$ uname -a
Linux dell 4.15.0-96-generic #97-Ubuntu SMP Wed Apr 1 03:25:46 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

$ cat /proc/version_signature 
Ubuntu 4.15.0-96.97-generic 4.15.18

和这个:

$ systemctl --version
systemd 237
+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid

我对 cgroups 的了解不够,无法自行进行更改...寻求帮助以尝试了解这里发生了什么。

非常感谢您的帮助,拜托!

编辑:根据要求:

$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX="locale=en_US intel_iommu=on"

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

编辑 2:将“systemd.legacy_systemd_cgroup_controller=true”添加到 GRUB_CMDLINE_LINUX_DEFAULT 后(更新 grub,然后重新启动):

$ grep cgroup /proc/filesystems
nodev   cgroup
nodev   cgroup2
boot systemd 18.04 cgroup
  • 1 1 个回答
  • 3582 Views

1 个回答

  • Voted
  1. Best Answer
    Raffa
    2020-04-22T18:04:06+08:002020-04-22T18:04:06+08:00

    您似乎已经安装了 Docker。Docker 使用 cgroups,并且您似乎启用了统一的 cgroup 层次结构(又名 cgroups-v2) 。据我所知,cgroups-v2 尚未被 Ubuntu 采用,最重要的是它不能与 cgroups-v1 一起启用,它们都做同样的工作,这可能会导致您看到的错误。

    我会建议一个基于systemd的简单修复,即向您的文件添加systemd.legacy_systemd_cgroup_controller=true选项,如下所示:/etc/default/grub

    /etc/default/grub通过在终端中运行以下命令在编辑器中打开文件:

    sudo nano /etc/default/grub
    

    找到这一行:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    

    将其更改为如下所示:

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.legacy_systemd_cgroup_controller=true"
    

    然后,保存文件并按Ctrl+关闭编辑器,X然后按Y再按Enter。

    然后通过在终端中运行以下命令来更新 GRUB:

    sudo update-grub
    

    然后通过在终端中运行以下命令来重置 systemd 的失败单元:

    sudo systemctl reset-failed
    

    然后重新启动系统。


    注意:

    只要最终成功,会话创建在引导期间失败一次或多次失败并不罕见。这似乎是您调查这些消息的情况:

    [FAILED] Failed to start Session c2 of user root. See 'systemctl status session-c2.scope' for details. 
    [FAILED] Failed to start Session c7 of user root. See 'systemctl status session-c7.scope' for details. 
    [FAILED] Failed to start Session c4 of user root. See 'systemctl status session-c4.scope' for details. 
    [FAILED] Failed to start Session c3 of user root. See 'systemctl status session-c3.scope' for details. 
    [  OK  ] Started Session c11 of user root.
    

    因此,如果您的系统没有其他问题,那么这些消息有时会发生并且是正常的。您似乎正在使用 Docker,这些范围/会话意味着登录,即。包括登录管理器在内的每个用户都需要一个单独的会话/范围,他们可能一开始会失败,然后再重试。底线是如果一切正常,您可以忽略这些消息。

    • 0

相关问题

  • 用户如何避免在启动时输入密码?[关闭]

  • 更改 Wubi 的启动顺序

  • 如何在 Ubuntu 启动时显示或隐藏启动消息?

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

  • 如何避免启动时出现“S to Skip”消息?

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