Unable to VNC onto Centos server remotely
Unable to VNC onto Centos server remotely
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
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
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Unable to VNC onto Centos server remotely
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.
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.
-
- Posts: 1
- Joined: 2014/05/08 20:40:15
Re: Unable to VNC onto Centos server remotely
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
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
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Unable to VNC onto Centos server remotely
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.
The vnc client automatically adds 5900 to the port number supplied in the connection.
For an http connection, the ports would start at 5800.
Re: Unable to VNC onto Centos server remotely
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"...
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"...
Re: Unable to VNC onto Centos server remotely
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
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
-
- Posts: 10642
- Joined: 2005/08/05 15:19:54
- Location: Northern Illinois, USA
Re: Unable to VNC onto Centos server remotely
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.
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.
Re: Unable to VNC onto Centos server remotely
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.
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
[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
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
Re: Unable to VNC onto Centos server remotely
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.