Workstation black screen or stuck solution and other problems

Problem: The workstation is blank or stuck, and changing the port number still cannot be solved.
Cause: The system is stuck and some processes are still being executed. Each login server can hold a limited number of processes, generally around 70, no more than 100, after which it will be black. In addition, if the home space is occupied until the home reaches the upper limit, all processes are stuck, and it is useless to apply for a new port number at this time.
Solution:
1. Kill the port number first in SSH;
vncserver -kill: port number.
2. Enter the .vnc hidden folder under home / username;
cd .vnc
3. View the folder;
ll -a
4. Delete the log file and .nfs file;
rm -f file.log
5. Prompt when the .nfs file is deleted Device or resource busy;
lsof .nfs file, check the PID
6. If you get the PID, kill the process directly;
kill PID
7, re-delete the .nfs file and re-apply for the port number to solve;
8. If you are prompted when using lsof do not have permission, you can use the ps command to see all processes;
9, write down the CMD line shows the PID ck-xinit-sessio directly kill the process;
10, .nfs delete the file again, and then re-apply the port number can be solved;
11 1. Apply for the port number, vncserver -geometry 1400x850, of
which 1400x850 is the screen resolution suitable for your computer.
Can also be established to establish a port number of 100+ or ​​more, vncserver -geometry 1400x850: 170 to generate 100170 port number.
12. Login to VNC is rejected, connect refused (10061)
shows that the connection was refused when connecting to vnc, error code 10061;
(1) Check whether the connected server and port number are correct;
(2) If the server and port number are correct, first pass ssh Log in to the server and log in, indicating that the linux vncserver service has been started.
Use the following command
ps -ef | grep vnc to view all vnc processes
ps -ef | grep vnc | grep uesrname View the process with the specified user name
Determine whether there are processes that have not ended, and if so, kill directly.
Kill all processes of the user: killall -u username, this command will kill the port number together, use with caution.

Published 38 original articles · Like 29 · Visits 10,000+

Guess you like

Origin blog.csdn.net/weixin_45270982/article/details/103878523