解決:vnc4server進程故障---->啓動圖形界面工具gnome遇到的問題

轉載:【實驗】【VNC】手工kill掉VNC進程的故障處理

轉載:http://blog.itpub.net/519536/viewspace-607552/

博主:secooler



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 --
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章