“systemd --user” 在启动时不加载

“systemd --user” 在启动时不加载

systemd 的用户实例在启动时无法启动:

kimifish@kimipc:~$ systemctl --user status kimibot
Failed to get properties: Process org.freedesktop.systemd1 exited with status 1

尝试手动运行时:

kimifish@kimipc:~$ sudo systemd --user --log-level=debug 
Trying to run as user instance, but $XDG_RUNTIME_DIR is not set.

我不知道还需要什么日志,所以……

kimifish@kimipc:~$ dmesg | grep systemd | head -n 43 
[ 2.555743] random: systemd-udevd: uninitialized urandom read (16 bytes read, 40 bits of entropy available) 
[ 2.555797] random: systemd-udevd: uninitialized urandom read (16 bytes read, 40 bits of entropy available) 
[ 2.555806] random: systemd-udevd: uninitialized urandom read (16 bytes read, 40 bits of entropy available) 
[ 2.555817] random: systemd-udevd: uninitialized urandom read (16 bytes read, 40 bits of entropy available) 
[ 9.052423] systemd[1]: systemd 229 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ -LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN) 
[ 9.058038] systemd[1]: Detected architecture x86-64. 
[ 9.068721] systemd[1]: Set hostname to <kimipc>. 
[ 9.237229] systemd[1]: Configuration file /lib/systemd/system/upnpd.service is marked world-inaccessible. This has no effect as configuration data is accessible via APIs without restrictions. Proceeding anyway. 
[ 9.243282] systemd[1]: Listening on Journal Socket. 
[ 9.248419] systemd[1]: Listening on Journal Socket (/dev/log). 
[ 9.253640] systemd[1]: Created slice User and Session Slice. 
[ 9.258992] systemd[1]: Listening on udev Kernel Socket. 
[ 9.264418] systemd[1]: Reached target User and Group Name Lookups. 
[ 9.269971] systemd[1]: Started Forward Password Requests to Wall Directory Watch. 
[ 9.275660] systemd[1]: Listening on Syslog Socket. 
[ 9.281372] systemd[1]: Listening on Journal Audit Socket. 
[ 9.287035] systemd[1]: Created slice System Slice. 
[ 9.292746] systemd[1]: Created slice system-kmsconvt.slice. 
[ 9.310146] systemd[1]: Starting Uncomplicated firewall... 
[ 9.318741] systemd[1]: Starting Load Kernel Modules... 
[ 9.324849] systemd[1]: Created slice system-openvpn.slice. 
[ 9.331259] systemd[1]: Started Read required files in advance. 
[ 9.337843] systemd[1]: Created slice system-systemd\x2dcryptsetup.slice.
[ 9.351207] systemd[1]: Mounting POSIX Message Queue File System... 
[ 9.365096] systemd[1]: Mounting Huge Pages File System... 
[ 9.372695] systemd[1]: Starting Create list of required static device nodes for the current kernel... 
[ 9.380608] systemd[1]: Mounting RPC Pipe File System... 
[ 9.388265] systemd[1]: Reached target Slices. 
[ 9.396176] systemd[1]: Created slice system-tor.slice. 
[ 9.404319] systemd[1]: Starting Set console keymap... 
[ 9.427201] systemd[1]: Mounting Debug File System... 
[ 9.434733] systemd[1]: Created slice system-systemd\x2dfsck.slice. 
[ 9.442212] systemd[1]: Starting Journal Service... 
[ 9.449337] systemd[1]: Listening on fsck to fsckd communication Socket. 
[ 9.460359] systemd[1]: Listening on udev Control Socket. 
[ 9.467462] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe. 
[ 9.474605] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point. 
[ 9.506699] systemd[1]: Mounted RPC Pipe File System. 
[ 9.515237] systemd[1]: Mounted Debug File System. 
[ 9.523310] systemd[1]: Mounted Huge Pages File System. 
[ 9.530888] systemd[1]: Mounted POSIX Message Queue File System. 
[ 9.538487] systemd[1]: Started Journal Service. 
[ 10.628966] systemd-journald[426]: Received request to flush runtime journal from PID 1 k

我也记不清发生这种情况时我做了什么,或者可能是由于某些更新... 那么,有没有简单的方法可以纠正这个问题? 我所有的用户 systemd 单元都乱了。=(

答案1

随着 Ubuntu 更新,问题消失。

相关内容