在 Power8 上為 RHEL 7 配置 VNC 會話時出現問題

在 Power8 上為 RHEL 7 配置 VNC 會話時出現問題

我跟隨http://www.linuxexplorers.com/2014/04/configure-vnc-server-in-red-hat-enterprise-linux-7-rhel7/配置 RHEL 7 VNC 伺服器。

在最後的設定步驟「systemctl start vncserver@:1.service」中,我得到了

Job for vncserver@:1.service failed. See 'systemctl status vncserver@:1.service' and 'journalctl -xn' for details. 

journalctl -xn 
-- Logs begin at Tue 2014-09-02 14:17:21 CDT, end at Tue 2014-09-02 15:28:53 CDT. -- 
Sep 02 15:28:53 xx.xx.xx.com systemd[1]: Started Session c2 of user zzz. 
-- Subject: Unit session-c2.scope has finished start-up 
-- Defined-By: systemd 
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel 
-- 
-- Unit session-c2.scope has finished starting up. 
-- 
-- The start-up result is done. 
Sep 02 15:28:53 xx.xx.xx.com runuser[42609]: pam_unix(runuser-l:session): session opened for user yyy 
Sep 02 15:28:53 xx.xx.xx.com runuser[42609]: Warning: xx.xx.xx.com:1 is taken because of /tmp 
Sep 02 15:28:53 xx.xx.xx.com runuser[42609]: Remove this file if there is no X server xx.xx.xx.com
Sep 02 15:28:53 xx.xx.xx.com runuser[42609]: A VNC server is already running as :1 
Sep 02 15:28:53 xx.xx.xx.com runuser[42609]: pam_unix(runuser-l:session): session closed for user yyy 
Sep 02 15:28:53 xx.xx.xx.com systemd[1]: vncserver@:1.service: control process exited, code=exited s 
Sep 02 15:28:53 xx.xx.xx.com 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. 
Sep 02 15:28:53 xx.xx.xx.com systemd[1]: Unit vncserver@:1.service entered failed state. 
Sep 02 15:28:53 xx.xx.xx.com systemd[1]: Failed to mark scope session-c2.scope as abandoned : Stale 

答案1

由於某些原因,看起來 vncserver 的實例已經在運作。現在為什麼你無法連接可能是一個不同的問題/問題

錯誤訊息會指示您刪除 /tmp 鎖定檔案。按照建議刪除這些訊息,然後重試。

來自同事..

:1 上已經有一個 VNC 伺服器實例正在運行,或先前的 :1 VNC 實例未正確關閉。無論哪種方式,vncserver 都會在/tmp/.X11-unix目錄中檢查並尋找 :1 會話的臨時檔案。

關閉 VNC 伺服器的正確方法是使用vncserver -kill :1.這應該在系統重新啟動之前完成,無論是手動還是在關閉腳本中。

如果沒有正在執行的 VNC 伺服器 :1 實例,請清除該/tmp/.X11-unix目錄並嘗試重新啟動 vncserver。

答案2

Job for vncserver@:7.service failed. See 'systemctl status vncserver@:7.service' and 'journalctl -xn' for details.

刪除該資料夾:

rm -r /tmp/.X11-unix/

它對我有用。

參考:

相關內容