【VNC】手工kill掉VNC进程的故障处理

简介:
1.模拟Kill掉已经启动的VNC服务
1)启动桌面1的服务
[root@testdb ~]# vncserver :1

New 'testdb:1 (root)' desktop is testdb:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/testdb:1.log

2)手工杀掉已经启动的VNC服务进程
[root@testdb ~]# ps -ef | grep -i vnc | grep -v grep
root      1178     1  0 11:07 pts/2    00:00:00 Xvnc :1 -desktop testdb:1 (root) -httpd /usr/share/vnc/classes -auth /root/.Xauthority -geometry 1024x768 -depth 16 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5901 -pn
root      1182     1  0 11:07 pts/2    00:00:00 vncconfig -iconic

[root@testdb ~]# kill -9 1178

3)确认进程已经杀掉
[root@testdb ~]# ps -ef | grep -i vnc | grep -v grep

4)再次启动桌面1的VNC服务,这里可以看到报错
[root@testdb ~]# vncserver :1

Warning: testdb:1 is taken because of /tmp/.X1-lock
Remove this file if there is no X server testdb:1
A VNC server is already running as :1

2.处理过程
很简单,按照错误提示的内容,需要删除/tmp/.X1-lock文件
[root@testdb ~]# rm -f /tmp/.X1-lock

启动尝试,仍然报错
[root@testdb ~]# vncserver :1

Warning: testdb:1 is taken because of /tmp/.X11-unix/X1
Remove this file if there is no X server testdb:1
A VNC server is already running as :1

同样,按照提示的错误,进一步删除/tmp/.X11-unix/X1文件
[root@testdb ~]# rm -f /tmp/.X11-unix/X1

再次启动尝试,OK,启动成功!
[root@testdb ~]# vncserver :1

New 'testdb:1 (root)' desktop is testdb:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/testdb:1.log

3.问题处理经验总结
再一次证明,解决技术问题的关键有
1)直面问题,充满信心,喜欢解决问题,即使时间紧任务重
2)远离浮躁
3)认真分析报错信息,寻找突破点
4)last but not least 向最好的老师Google请教

-- The End --
目录
相关文章
|
1月前
|
监控 Shell Linux
【Shell 命令集合 系统管理 】⭐⭐⭐Linux 向进程发送信号 kill命令 使用指南
【Shell 命令集合 系统管理 】⭐⭐⭐Linux 向进程发送信号 kill命令 使用指南
31 0
|
3月前
|
Shell Linux 开发工具
linux shell脚本利用 kill -0 检查进程是否存在
linux shell脚本利用 kill -0 检查进程是否存在
59 1
|
2月前
|
监控 Unix 调度
进程终结之道:kill与pskill的神奇战斗
进程终结之道:kill与pskill的神奇战斗
47 0
|
4月前
|
安全 Linux 开发工具
linux(三十二)系统信息命令kill终止进程
linux(三十二)系统信息命令kill终止进程
39 2
|
5月前
|
SQL 关系型数据库 MySQL
mysql中kill掉所有锁表的进程
mysql中kill掉所有锁表的进程
50 0
|
6月前
48Linux - 系统管理(终止进程:kill)
48Linux - 系统管理(终止进程:kill)
21 0
|
7月前
|
安全 IDE Java
进程管理:kill命令之-9与-15
kill :发送指定的信号到相应进程。不指定信号将发送SIGTERM(15)终止指定进程。若仍无法终止该程序可用“-KILL” 参数,其发送的信号为SIGKILL(9) ,将强制结束进程,使用ps命令或者jobs 命令可以查看进程号。root用户将影响用户的进程,非root用户只能影响自己的进程。
149 0
|
1月前
|
存储 Shell Linux
【Shell 命令集合 系统设置 】⭐⭐⭐Linux 限制进程资源 ulimit命令 使用指南
【Shell 命令集合 系统设置 】⭐⭐⭐Linux 限制进程资源 ulimit命令 使用指南
38 0
|
29天前
|
消息中间件 Linux 调度
【Linux 进程/线程状态 】深入理解Linux C++中的进程/线程状态:阻塞,休眠,僵死
【Linux 进程/线程状态 】深入理解Linux C++中的进程/线程状态:阻塞,休眠,僵死
67 0
|
7天前
|
监控 Linux
linux监控指定进程
请注意,以上步骤提供了一种基本的方式来监控指定进程。根据你的需求,你可以选择使用不同的工具和参数来获取更详细的进程信息。
14 0

相关实验场景

更多