vncserver failed

Issues related to applications and software problems and general support
Post Reply
ShinShin
Posts: 2
Joined: 2020/11/16 23:38:10

vncserver failed

Post by ShinShin » 2020/11/17 00:48:11

Excuse me for writing by my poor English.

I followed https://www.linuxtechi.com/install-conf ... os8-rhel8/.
But I can't start vncserver just below.

Code: Select all

$ sudo systemctl start vncserver@:1.service
Job for vncserver@:1.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status vncserver@:1.service" and "journalctl -xe" for details.

Code: Select all

[shin@server ~]$ sudo systemctl status vncserver@:1.service
● vncserver@:1.service - Remote desktop service (VNC)
   Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
   Active: failed (Result: protocol) since Tue 2020-11-17 08:56:15 JST; 5s ago
  Process: 4228 ExecStart=/sbin/runuser -l shin -c /usr/bin/vncserver :1 -geometry 1280x1024 (code=exited, status=0/SUCCESS)
  Process: 4225 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill :1 > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)

11月 17 08:56:15 server systemd[1]: Starting Remote desktop service (VNC)...
11月 17 08:56:15 server systemd[1]: vncserver@:1.service: Can't open PID file /home/shin/.vnc/server:1.pid (yet?) after start: No such file or d>
11月 17 08:56:15 server systemd[1]: vncserver@:1.service: Failed with result 'protocol'.
11月 17 08:56:15 server systemd[1]: Failed to start Remote desktop service (VNC).

Code: Select all

[shin@server ~]$ journalctl -xe
-- Support: https://access.redhat.com/support
-- 
-- The unit vncserver@:1.service has entered the 'failed' state with result 'protocol'.
11月 17 08:56:15 server systemd[1]: Failed to start Remote desktop service (VNC).
-- Subject: Unit vncserver@:1.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- Unit vncserver@:1.service has failed.
-- 
-- The result is failed.
11月 17 08:56:15 server systemd[1]: session-c5.scope: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
-- 
-- The unit session-c5.scope has successfully entered the 'dead' state.
11月 17 08:56:15 server sudo[4222]: pam_unix(sudo:session): session closed for user root
11月 17 08:56:20 server sudo[4279]:      shin : TTY=pts/0 ; PWD=/home/shin ; USER=root ; COMMAND=/bin/systemctl status vncserver@:1.service
11月 17 08:56:20 server auditd[801]: Audit daemon rotating log files
11月 17 08:56:20 server sudo[4279]: pam_systemd(sudo:session): Cannot create session: Already running in a session or user slice
11月 17 08:56:20 server sudo[4279]: pam_unix(sudo:session): session opened for user root by shin(uid=0)
11月 17 08:56:21 server sudo[4279]: pam_unix(sudo:session): session closed for user root
[shin@server ~]$
According to this result vncserver is already running in a session or user slice.
But I can't stop and disable it because I've made and deleted and run a lot of files by a struggle to start vncserver to see other various web sites.

How should I do to start vncserver. Please help me.
Shin

User avatar
TrevorH
Forum Moderator
Posts: 29902
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: vncserver failed

Post by TrevorH » 2020/11/17 09:23:15

Does /home/shin/.vnc/ exist? Is it owned and permssions set correctly? Did you set a vnc password and have it store it in that directory?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

ShinShin
Posts: 2
Joined: 2020/11/16 23:38:10

Re: vncserver failed

Post by ShinShin » 2020/11/17 23:48:17

Thank you, TrevorH.
Does /home/shin/.vnc/ exist? Is it owned and permssions set correctly? Did you set a vnc password and have it store it in that directory?
Of course.

Code: Select all

[shin@server ~]$ LANG=en ls -la /home/shin/.vnc
total 8
drwxrwxr-x   2 shin shin   20 Nov 17 06:51 .
drwxr-xr-x. 21 shin shin 4096 Nov 17 08:57 ..
-rw-------   1 shin shin    8 Nov 17 07:41 passwd
[shin@server ~]$ 
Please help me.

gerry666uk
Posts: 59
Joined: 2020/02/10 19:06:06

Re: vncserver failed

Post by gerry666uk » 2020/11/23 16:07:42

When using RHEL / CentOS, it's important to follow the official guides

https://access.redhat.com/documentation ... h-tigervnc

NOTE that this guide is for RHEL7, I can't find the RHEL8 version, and there may be some changes, but see also the man pages they make reference to at the end of the article.

This guide covers a number of scenarios - per user, per machine, clients, servers, gdm, remote desktops etc, so it's important to clarify the goal, and then follow the relevant paragraphs. The guide you cited above says you need to disable SELinux, and that's not good.

Post Reply

Return to “CentOS 8 - General Support”