Get the App
SLTechnology News&Howtos  ›  Servers  › 

Vnc cannot be connected, Warning: zhouziqi:1 appears

Shulou Source: shulou.com Published: 2022-06-03 09:43:04 09月21日 Update

The landlord did not know what had happened, but suddenly there was no VNC on the side. I planned to restart the service and found that the service could not be started. I used it.

The following appears in the journalctl-xe command:

Apr 24 21:30:24 zhouziqi runuser [23390]: pam_unix (runuser-l:session): session opened for user root by (uid=0)

Apr 24 21:30:24 zhouziqi runuser [23390]: Warning: zhouziqi:1 is taken because of / tmp/.X11-unix/X1

Apr 24 21:30:24 zhouziqi runuser [23390]: Remove this file if there is no X server zhouziqi:1

Apr 24 21:30:24 zhouziqi runuser [23390]: A VNC server is already running as: 1

Apr 24 21:30:24 zhouziqi runuser [23390]: pam_unix (runuser-l:session): session closed for user root

Apr 24 21:30:24 zhouziqi systemd [1]: vncserver@:1.service: control process exited, code=exited status=2

Apr 24 21:30:24 zhouziqi systemd [1]: Failed to start Remote desktop service (VNC).

-- Subject: Unit vncserver@:1.service has failed

-- Defined-By: systemd

-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

--

-- Unit vncserver@:1.service has failed.

--

-- The result is failed.

Apr 24 21:30:24 zhouziqi systemd [1]: Unit vncserver@:1.service entered failed state.

Apr 24 21:30:24 zhouziqi systemd [1]: vncserver@:1.service failed.

Apr 24 21:30:24 zhouziqi polkitd: Unregistered Authentication Agent for unix-process:23380:8874254 (system bus n

And then I knew it might be

So I deleted the file and restarted it and found it.

[root@zhouziqi tmp] # rm-rvf. X11-unix

Removed'. X11Musi UnixCompact X0'

Removed'. X11MuiUnixUnixCompare X1'

Removed directory: '.X11Mui Unix'

[root@zhouziqi tmp] # systemctl restart vncserver@:1.service

[root@zhouziqi tmp] #

The landlord wants to see what this folder is for, so I'll go in and have a look. It turns out that this folder contains a file, X1. It is estimated that this file was generated when you connected. If you VNC does not exit normally, this file will not be deleted, so it will appear.

A VNC server is already running as: 1. At this point, you can restart the service by manually deleting the files in that folder.

Tags: Files folders services landlords things commands things manual time noodles Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei Shulou Tech Info NVidia Docker OPPO Reno