Unable to VNC onto Centos server remotely

Issues related to software problems.
Post Reply
dudwell
Posts: 1
Joined: 2013/04/12 13:18:51

Unable to VNC onto Centos server remotely

Post by dudwell » 2013/04/12 13:46:23

Hello, let me start by saying I am a complete newbie to the Linux/Centos world so apologies in advance for the elementary questions/responses. My problem is the following; having built a Centos 5.9 server I am trying to configure remote access using VNCServer/VNCViewer. Having followed all the steps outlined here: http://wiki.centos.org/HowTos/VNC-Server , I am still having issues when i try to connect . The fact that Im not prompted for a password whatsoever leads me to believe that there is something not running on the server side to begin with e.g. a service under a particular user. So far I have done the following:

1. Created the accounts for example:
VNCSERVERS="1:larry 2:moe 3:curly"
VNCSERVERARGS[1]="-geometry 640x480"
VNCSERVERARGS[2]="-geometry 640x480"

2. Created the ~/.vnc directory for that users

3. Attempted to restart the service under the root account. When doing so, it displays the following line which might suggest that the service is running under one of the accounts, 'test', that ive created also:

[root@IMGCentos ~]# /sbin/service vncserver start
Starting VNC server: 3:test A VNC server is already running as :3
[FAILED]
[root@IMGCentos ~]# /sbin/service vncserver stop
Shutting down VNC server: 3:test [ OK ]
[root@IMGCentos ~]# /sbin/chkconfig vncserver on
[root@IMGCentos ~]#

4. Disabled the firewall

At this stage, having followed all of the steps outlined on the HowTos/VNC server page I am still unable to connect and still not getting prompted for a password. Can anyone point me in the right direction with this. Im sure there are logs that can tell me where things are falling over. Hopefully someone can provide some steps on the best way to troubleshoot. Any feedback is much appreciated.

Cheers

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Unable to VNC onto Centos server remotely

Post by gerald_clark » 2013/04/12 15:45:32

You say you followed the wiki but then give steps that are either not in the wiki or do not follow the wiki.

The wiki instructions are correct, and will result in a working vnc server.
Some thinking is required, and the user examples are just examples.
The users larry, moe, and curly are likely not really users on your system.

LalitSingh
Posts: 1
Joined: 2014/05/08 20:40:15

Re: Unable to VNC onto Centos server remotely

Post by LalitSingh » 2014/05/08 20:45:45

Descriprtion given on the page is correct just the port number configured for vnc is 5901..5903 but in the connection part there is a typo 5801..5803.
In order to use it you need to use port

Larry is http://192.168.0.10:5901
Moe is http://192.168.0.10:5902
Curly is http://192.168.0.10:5903

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Unable to VNC onto Centos server remotely

Post by gerald_clark » 2014/05/08 21:29:37

No, the instructions are not wrong.
The vnc client automatically adds 5900 to the port number supplied in the connection.
For an http connection, the ports would start at 5800.

DavidBLit
Posts: 1
Joined: 2014/06/30 18:55:01

Re: Unable to VNC onto Centos server remotely

Post by DavidBLit » 2014/06/30 19:24:43

The instructions may be technically "correct", but they're also confusing and misleading:

Section 2.6 instructs how to open the needed ports 5901..5903 but also throws in ports 6001..6003 with no explanation or reference.

Then Section 2.8.1 pops in with ports 5801..5803. If the unwary (i.e., me) doesn't already know what the deal is with 5801..5803 it becomes very confusing for simple minds like mine:

"Should I have also put 5801..5803 in the iptables step?"

"Was that a typo in the iptables step with 59xx?"

"WTF 6001..6003?"

Part of the problem is that Section 2.8.1 is thrown out with the expectation that the reader already knows to ignore it if their need is only client/vncviewer connections. 2.8.1 should have been placed after the "Testing with a vnc (sic) client" section.

Enough of that stuff and the needle does indeed begin to tilt toward "this stuff is out-of-date/incomplete/maybe-even-wrong"...

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Unable to VNC onto Centos server remotely

Post by TrevorH » 2014/06/30 19:56:35

Feel free to register for an account on the wiki by signing up to the centos-docs mailing list and saying what you'd like to edit. Corrections are always welcome.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

gerald_clark
Posts: 10642
Joined: 2005/08/05 15:19:54
Location: Northern Illinois, USA

Re: Unable to VNC onto Centos server remotely

Post by gerald_clark » 2014/06/30 20:11:40

I wrote Section 2 of that guide, but I did not write section 2.6.
That is the problem with wikis.
A lot of work is spent writing accurate instructions that work.
Then someone else comes along and rewrites and re-aranges it until it nolonger makes sense.
Feel free to fix it.

ss32
Posts: 25
Joined: 2014/05/28 17:51:19

Re: Unable to VNC onto Centos server remotely

Post by ss32 » 2014/09/09 15:04:46

Bumping this because I'm running into a similar problem. After the wiki failed me I found these instructions http://rbgeek.wordpress.com/2012/06/26/ ... -centos-6/ and tested them on a fresh install of CentOS 6.5 on a virtual machine and it works flawlessly but I'm running into trouble on the physical server.

Code: Select all

[user@lnxapp ~]$ sudo service vncserver restart
Shutting down VNC server:                                  [  OK  ]
Starting VNC server: 1:user A VNC server is already running as :1
                                                           [FAILED]
[user@lnxapp ~]$ vncserver -kill :1

Can't find file /home/user/.vnc/lnxapp:1.pid
You'll have to kill the Xvnc process manually
edit: I forgot to add this is on a Xen server and now I'm wondering if the VM Manager is running vnc

Code: Select all

[root@lnxapp user]# netstat -antup | grep 5900
tcp        0      0 127.0.0.1:5900              0.0.0.0:*                   LISTEN      51532/qemu-dm  

ss32
Posts: 25
Joined: 2014/05/28 17:51:19

Re: Unable to VNC onto Centos server remotely

Post by ss32 » 2014/09/10 17:40:28

I solved my problem. Xen creates a new display for each virtual machine so all I neede to do was create a display for VNC that wasn't already being used by the virtual machine.

Post Reply