Debian 11, 잘 작동하지만 이상한 시스템 오류

Debian 11, 잘 작동하지만 이상한 시스템 오류

저는 Debian 11을 사용하고 있으며 사용자는 kvm을 사용하여 VM에서 콘솔, ssh 및 lightdm을 통해 로그인할 수 있습니다. 하지만 시스템에 오류가 발생했습니다.

sudo systemctl status [email protected][email protected] - User Manager for UID 1000
     Loaded: loaded (/lib/systemd/system/[email protected]; static)
    Drop-In: /lib/systemd/system/[email protected]
             └─sysfs.conf
     Active: failed (Result: exit-code) since Mon 2021-09-06 20:20:08 UTC; 50min ago
       Docs: man:[email protected](5)
   Main PID: 897 (code=exited, status=1/FAILURE)
        CPU: 12ms

set 06 20:20:08 host systemd[1]: Starting User Manager for UID 1000...
set 06 20:20:08 host systemd[897]: pam_unix(systemd-user:session): session opened for user user(uid=1000) by (uid=0)
set 06 20:20:08 host systemd[897]: Failed to determine supported controllers: No such process
set 06 20:20:08 host systemd[897]: Failed to allocate manager object: No such process
set 06 20:20:08 host systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
set 06 20:20:08 host systemd[1]: [email protected]: Failed with result 'exit-code'.
set 06 20:20:08 host systemd[1]: Failed to start User Manager for UID 1000.

서비스가 이 줄을 실행하려고 시도하는 것을 보았습니다.

grep -i exec /lib/systemd/system/[email protected]
ExecStart=/lib/systemd/systemd --user

서비스를 디버그하려고 합니다.

/lib/systemd/systemd --user --log-level=debug

systemd 247.3-6 running in user mode for user 1000/user. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +ZSTD +SECCOMP +BLKID +ELFUTILS +KMOD +IDN2 -IDN +PCRE2 default-hierarchy=unified)
Failed to create '/run/user/1000/systemd/inaccessible', ignoring: File exists
Failed to create '/run/user/1000/systemd/inaccessible/reg', ignoring: File exists
Failed to create '/run/user/1000/systemd/inaccessible/dir', ignoring: File exists
Failed to create '/run/user/1000/systemd/inaccessible/fifo', ignoring: File exists
Failed to create '/run/user/1000/systemd/inaccessible/sock', ignoring: File exists
Failed to create '/run/user/1000/systemd/inaccessible/chr', ignoring: File exists
Failed to create '/run/user/1000/systemd/inaccessible/blk', ignoring: Operation not permitted
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Failed to determine root cgroup, ignoring cgroup memory limit: No such process
RLIMIT_MEMLOCK is already as high or higher than we need it, not bumping.
Found cgroup2 on /sys/fs/cgroup/, full unified hierarchy
Unified cgroup hierarchy is located at /sys/fs/cgroup/user.slice/user-1000.slice/session-1.scope.
Failed to create /user.slice/user-1000.slice/session-1.scope/init.scope control group: Permission denied
Failed to allocate manager object: Permission denied

해결책이 있나요?

답변1

솔루션/해결 방법을 찾았습니다. systemd의 버그일 수 있습니다. grub "systemd.unified_cgroup_hierarchy=0"에서 이 명령줄을 사용하면 모든 것이 잘 작동합니다.

vim /etc/default/grub

GRUB_CMDLINE_LINUX="apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=0"

update-grub2
shutdown -r now

몇 가지 점검을 했는데 모든 것이 예상대로 작동하고 있습니다.

systemctl is-active [email protected] 
active
sudo systemctl list-units --state failed 
  UNIT LOAD ACTIVE SUB DESCRIPTION
0 loaded units listed.

관련 정보