systemd:无法启动由 gnome-session-binary 启动的应用程序

systemd:无法启动由 gnome-session-binary 启动的应用程序

如果您检查错误日志,就会发现该.scope单元未找到 - No such process。我遇到了 4 次类似的错误。

我想了解启动过程中发生了什么。为什么会出现这些错误?如何调试它以找到更多细节?

完整日志

这部分出现前三个错误

...
Jan 05 13:42:51 magnetron systemd[2284]: Starting GNOME Session Manager (session: gnome)...
░░ Subject: A start job for unit UNIT has begun execution
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit UNIT has begun execution.
░░ 
░░ The job identifier is 393.
Jan 05 13:42:51 magnetron gnome-keyring-daemon[2337]: The PKCS#11 component was already initialized
Jan 05 13:42:51 magnetron gnome-keyring-d[2337]: The PKCS#11 component was already initialized
Jan 05 13:42:51 magnetron gnome-keyring-daemon[2337]: The Secret Service was already initialized
Jan 05 13:42:51 magnetron gnome-keyring-secrets.desktop[2746]: discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/1000/keyring
Jan 05 13:42:51 magnetron gnome-keyring-secrets.desktop[2746]: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
Jan 05 13:42:51 magnetron gnome-keyring-pkcs11.desktop[2745]: discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/1000/keyring
Jan 05 13:42:51 magnetron gnome-keyring-pkcs11.desktop[2745]: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
Jan 05 13:42:51 magnetron gnome-keyring-ssh.desktop[2744]: discover_other_daemon: 1GNOME_KEYRING_CONTROL=/run/user/1000/keyring
Jan 05 13:42:51 magnetron gnome-keyring-ssh.desktop[2744]: SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
Jan 05 13:42:51 magnetron gnome-keyring-d[2337]: The Secret Service was already initialized
Jan 05 13:42:51 magnetron gnome-keyring-daemon[2744]: discover_other_daemon: 1
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dpkcs11-2742.scope: Couldn't move process 2742 to requested cgroup '/user.slice/user-1000.slice/[email protected]/app.slice/app-gnome-gnome\x2
dkeyring\x2dpkcs11-2742.scope': No such process
Jan 05 13:42:51 magnetron gnome-keyring-daemon[2746]: discover_other_daemon: 1
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dpkcs11-2742.scope: Failed to add PIDs to scope's control group: No such process
Jan 05 13:42:51 magnetron gnome-keyring-daemon[2745]: discover_other_daemon: 1
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dpkcs11-2742.scope: Failed with result 'resources'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit UNIT has entered the 'failed' state with result 'resources'.
Jan 05 13:42:51 magnetron systemd[2284]: Failed to start Application launched by gnome-session-binary.
░░ Subject: A start job for unit UNIT has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit UNIT has finished with a failure.
░░ 
░░ The job identifier is 450 and the job result is failed.
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dsecrets-2743.scope: Couldn't move process 2743 to requested cgroup '/user.slice/user-1000.slice/[email protected]/app.slice/app-gnome-gnome\x2dkeyring\x2dsecrets-2743.scope': No such process
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dsecrets-2743.scope: Failed to add PIDs to scope's control group: No such process
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dsecrets-2743.scope: Failed with result 'resources'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit UNIT has entered the 'failed' state with result 'resources'.
Jan 05 13:42:51 magnetron systemd[2284]: Failed to start Application launched by gnome-session-binary.
░░ Subject: A start job for unit UNIT has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit UNIT has finished with a failure.
░░ 
░░ The job identifier is 454 and the job result is failed.
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dssh-2740.scope: Couldn't move process 2740 to requested cgroup '/user.slice/user-1000.slice/[email protected]/app.slice/app-gnome-gnome\x2dkeyring\x2dssh-2740.scope': No such process
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dssh-2740.scope: Failed to add PIDs to scope's control group: No such process
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-gnome\x2dkeyring\x2dssh-2740.scope: Failed with result 'resources'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit UNIT has entered the 'failed' state with result 'resources'.
Jan 05 13:42:51 magnetron systemd[2284]: Failed to start Application launched by gnome-session-binary.
░░ Subject: A start job for unit UNIT has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit UNIT has finished with a failure.
...

最后一个错误位于日志中的不同位置:

Jan 05 13:42:51 magnetron gnome-session[2735]: gnome-session-binary[2735]: GnomeDesktop-WARNING: Could not create transient scope for PID 2747: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 2747 does not exist.
Jan 05 13:42:51 magnetron gnome-session-binary[2735]: GnomeDesktop-WARNING: Could not create transient scope for PID 2747: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 2747 does not exist.
Jan 05 13:42:51 magnetron gnome-session[2735]: gnome-session-binary[2735]: GnomeDesktop-WARNING: Could not create transient scope for PID 2749: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 2749 does not exist.
Jan 05 13:42:51 magnetron gnome-session-binary[2735]: GnomeDesktop-WARNING: Could not create transient scope for PID 2749: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 2749 does not exist.
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-at\x2dspi\x2ddbus\x2dbus-2752.scope: Couldn't move process 2752 to requested cgroup '/user.slice/user-1000.slice/[email protected]/app.slice/app-gnome-at\x2dspi\x2ddbus\x2dbus-2752.scope': No such process
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-at\x2dspi\x2ddbus\x2dbus-2752.scope: Failed to add PIDs to scope's control group: No such process
Jan 05 13:42:51 magnetron systemd[2284]: app-gnome-at\x2dspi\x2ddbus\x2dbus-2752.scope: Failed with result 'resources'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ The unit UNIT has entered the 'failed' state with result 'resources'.
Jan 05 13:42:51 magnetron systemd[2284]: Failed to start Application launched by gnome-session-binary.
░░ Subject: A start job for unit UNIT has failed
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit UNIT has finished with a failure.
░░ 

我的系统是 Debian Bookworm:

uname -a

Linux magnetron 6.0.0-6-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.0.12-1 (2022-12-09) x86_64 GNU/Linux

答案1

我的猜测是“GNOME Session Manager (session: gnome)”服务单元中存在一些错误。因为没有健全的系统单元被命名为“UNIT”

相关内容