나는 다음과 같은 것을 본다 :
[ 181.919605] preshutdown[3874]: Starting /home/ctor/bin/preshutdown
[ 181.920611] crond[3284]: (CRON) INFO (Shutting down)
[ 181.931087] systemd[1]: Stopping Session 2 of user ctor.
...
[ 211.953070] systemd[1]: session-2.scope: Stopping timed out. Killing.
[ 211.953183] systemd[1]: session-2.scope: Killing process 3584 (qubes-guid) with signal SIGKILL.
[ 211.953372] systemd[1]: [email protected]: State 'stop-sigterm' timed out. Killing.
[ 211.953742] systemd[1]: [email protected]: Killing process 3382 (systemd) with signal SIGKILL.
[ 211.954105] systemd[1]: [email protected]: Killing process 3874 (preshutdown) with signal SIGKILL.
[ 211.954153] systemd[1]: [email protected]: Killing process 4923 (sleep) with signal SIGKILL.
[ 211.956105] systemd[1]: Stopped User Manager for UID 1000.
[ 211.956164] systemd[1]: [email protected]: Unit entered failed state.
[ 211.956186] systemd[1]: [email protected]: Failed with result 'timeout'.
[ 211.956386] systemd[1]: Stopped Session 2 of user ctor.
[ 211.956515] systemd[1]: session-2.scope: Unit entered failed state.
[ 211.956877] systemd[1]: dev-disk-by\x2did-lvm\x2dpv\x2duuid\x2dpxC3ch\x2d0MF0\x2dOzJs\x2dJogd\x2d9rOz\x2dJkSt\x2dCf8G7m.device: Job dev-disk-by\x2did-lvm\x2dpv\x2duuid\x2dpxC3ch\x2d0MF0\x2dOzJs\x2dJogd\x2d9rOz\x2dJkSt\x2dCf8G7m.device/stop timed out.
[ 211.956951] systemd[1]: Timed out stopping /dev/disk/by-id/lvm-pv-uuid-pxC3ch-0MF0-OzJs-Jogd-9rOz-JkSt-Cf8G7m.
[ 211.957107] systemd[1]: dev-disk-by\x2did-lvm\x2dpv\x2duuid\x2dpxC3ch\x2d0MF0\x2dOzJs\x2dJogd\x2d9rOz\x2dJkSt\x2dCf8G7m.device: Job dev-disk-by\x2did-lvm\x2dpv\x2duuid\x2dpxC3ch\x2d0MF0\x2dOzJs\x2dJogd\x2d9rOz\x2dJkSt\x2dCf8G7m.device/stop failed with result 'timeout'.
[ 211.957280] systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device: Job dev-disk-by\x2did-dm\x2dname\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device/stop timed out.
[ 211.957335] systemd[1]: Timed out stopping /dev/disk/by-id/dm-name-luks-9ed952b5-2aa8-4564-b700-fb23f5c9e94b.
[ 211.957398] systemd[1]: dev-disk-by\x2did-dm\x2dname\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device: Job dev-disk-by\x2did-dm\x2dname\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device/stop failed with result 'timeout'.
[ 211.957611] systemd[1]: dev-block-253:0.device: Job dev-block-253:0.device/stop timed out.
[ 211.957647] systemd[1]: Timed out stopping LVM PV pxC3ch-0MF0-OzJs-Jogd-9rOz-JkSt-Cf8G7m on /dev/dm-0.
[ 211.957715] systemd[1]: dev-block-253:0.device: Job dev-block-253:0.device/stop failed with result 'timeout'.
[ 211.957770] systemd[1]: dev-dm\x2d0.device: Job dev-dm\x2d0.device/stop timed out.
[ 211.957798] systemd[1]: Timed out stopping /dev/dm-0.
[ 211.957847] systemd[1]: dev-dm\x2d0.device: Job dev-dm\x2d0.device/stop failed with result 'timeout'.
[ 211.957901] systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d9ed952b52aa84564b700fb23f5c9e94b\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d9ed952b52aa84564b700fb23f5c9e94b\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device/stop timed out.
[ 211.957972] systemd[1]: Timed out stopping /dev/disk/by-id/dm-uuid-CRYPT-LUKS1-9ed952b52aa84564b700fb23f5c9e94b-luks-9ed952b5-2aa8-4564-b700-fb23f5c9e94b.
[ 211.958047] systemd[1]: dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d9ed952b52aa84564b700fb23f5c9e94b\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device: Job dev-disk-by\x2did-dm\x2duuid\x2dCRYPT\x2dLUKS1\x2d9ed952b52aa84564b700fb23f5c9e94b\x2dluks\x2d9ed952b5\x2d2aa8\x2d4564\x2db700\x2dfb23f5c9e94b.device/stop failed with result 'timeout'.
[ 211.958075] systemd[1]: sys-devices-virtual-block-dm\x2d0.device: Job sys-devices-virtual-block-dm\x2d0.device/stop timed out.
[ 211.958174] systemd[1]: Timed out stopping /sys/devices/virtual/block/dm-0.
[ 211.958222] systemd[1]: sys-devices-virtual-block-dm\x2d0.device: Job sys-devices-virtual-block-dm\x2d0.device/stop failed with result 'timeout'.
[ 211.958774] systemd[1]: Removed slice User Slice of ctor.
[ 211.958911] systemd[1]: Stopping Login Service...
[ 211.960223] systemd[1]: Stopping Permit User Sessions...
[ 211.964389] systemd[1]: Stopped Permit User Sessions.
[ 211.964558] systemd[1]: Stopped Start Qubes VM sys-net.
[ 211.964618] systemd[1]: Stopped Start Qubes VM sys-firewall.
[ 211.966532] systemd[1]: Removed slice system-qubes\x2dvm.slice.
[ 211.970050] systemd[1]: Stopping Qubes memory information reporter...
[ 211.975886] systemd[1]: Stopped Qubes memory information reporter.
[ 211.982513] systemd[1]: Stopping Qubes Dom0 startup setup...
위의 내용은 이 블로그에서 언급되지 않은 내용 preshutdown
에서 나온 것입니다 (이유는 모르겠습니다). --user
.service
Stopping
그러나 서비스인지 --user
아닌지 에 관계없이 --system
systemd에게 서비스를 중지하고 서비스가 시도되기 전에 중지를 완료하도록 어떻게 지시합니까 Stopping Session X of user Y
?
이 문제를 해결하는 방법을 알고 있다면 아마도 문제를 해결할 수 있을 것입니다(또는 제가 해결하도록 도와주세요).이것그것도 하나 가지고 그 작은 현상금을 모으십시오.
해당되는 경우 위 로그를 생성하는 내 --user
서비스( )는 다음과 같습니다./usr/lib/systemd/user/mowron.service
[Unit]
Description=Mowron
#Wants=
RequiresMountsFor=/home/ /dev/dm-0 /dev/disk/by-id/dm-uuid-CRYPT-LUKS1-9ed952b52aa84564b700fb23f5c9e94b-luks-9ed952b5-2aa8-4564-b700-fb23f5c9e94b /dev/disk/by-id/lvm-pv-uuid-pxC3ch-0MF0-OzJs-Jogd-9rOz-JkSt-Cf8G7m /dev/disk/by-id/dm-name-luks-9ed952b5-2aa8-4564-b700-fb23f5c9e94b /sys/devices/virtual/block/dm-0
After=qubes-db-dom0.service libvirtd.service xenconsoled.service qubesd.service qubes-qmemman.service systemd-udev-settle.service remote-fs.target remote-fs-pre.target systemd-user-sessions.service
Conflicts=shutdown.target reboot.target halt.target
#BindsTo=systemd-udev-settle.service systemd-user-sessions.service
#PartOf=systemd-user-sessions.service
#Wants=systemd-user-sessions.service
#Requires=systemd-user-sessions.service
#Failed to start mowron.service: Unit systemd-user-sessions.service not found.
#i mean, it's only here: /usr/lib/systemd/system/systemd-user-sessions.service
[Service]
Type=oneshow
RemainAfterExit=yes
ExecStart=/bin/true
ExecStop=/home/ctor/bin/preshutdown
[Install]
WantedBy=default.target
Fedora 25 시스템 버전(업그레이드할 수 없음):
[ctor@dom0 ~]$ systemctl --version
systemd 231
+PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN