VNCSERVER 重启后突然报错:ExecStart=/usr/bin/vncserver_wrapper oracle %i (code=exited, status=2)
[root@ykt ~]# systemctl restart vncserver@:1
[root@ykt ~]# systemctl status vncserver@:1
vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2021-02-14 04:14:26 CST; 7s ago
Process: 15490 ExecStart=/usr/bin/vncserver_wrapper oracle %i (code=exited, status=2)
Process: 15486 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill %i > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Main PID: 15490 (code=exited, status=2)
Feb 14 04:14:26 ykt systemd[1]: Starting Remote desktop service (VNC)...
Feb 14 04:14:26 ykt systemd[1]: Started Remote desktop service (VNC).
Feb 14 04:14:26 ykt vncserver_wrapper[15490]: Warning: ykt:1 is taken because of /tmp/.X11...X1
Feb 14 04:14:26 ykt vncserver_wrapper[15490]: Remove this file if there is no X server ykt:1
Feb 14 04:14:26 ykt vncserver_wrapper[15490]: A VNC server is already running as :1
Feb 14 04:14:26 ykt vncserver_wrapper[15490]: FATAL: 'runuser -l oracle' failed!
Feb 14 04:14:26 ykt systemd[1]: vncserver@:1.service: main process exited, code=exited, ...MENT
Feb 14 04:14:26 ykt systemd[1]: Unit vncserver@:1.service entered failed state.
Feb 14 04:14:26 ykt systemd[1]: vncserver@:1.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
注意看第12行提示 Warning: ykt:1 is taken because of /tmp/.X11…X1
这是因为以前运行vncserver:1时产生的临时文件阻止了我们现在使用:1这个display, 所以直接删除这个临时目录就解决了问题:rm -rf /tmp/.X11-unix
标签:ExecStart,status,26,Feb,14,04,vncserver,报错,ykt
来源: https://blog.csdn.net/Jayious/article/details/113803757