LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   VNC Connection refused (10061) (https://www.linuxquestions.org/questions/linux-newbie-8/vnc-connection-refused-10061-a-4175491696/)

vijaybhandari 01-18-2014 06:03 AM

VNC Connection refused (10061)
 
Hi,
I had installed tigervnc pacakges
1 tigervnc-server-1.1.0-5.el6_4.1.x86_64
2 tigervnc-1.1.0-5.el6_4.1.x86_64

Linux Distro : RHEL 6.4
Kernel version :2.6.32-358.el6.x86_64

when i try to connect through vncviewer it displays the error

VNC Connection refused (10061)

How to solve this problem ???

mostlyharmless 01-18-2014 08:05 AM

Usually that means there's no server detected. You installed the server, but are you running it? (i've forgotten to do this myself actually)
What does ps aux | grep vnc show?
If it is running, make sure the port, usually 5900, is open. If it is you can try running nmap to detect the service.

vijaybhandari 01-18-2014 08:17 AM

The vnc server is running

[root@localhost ~]# /etc/init.d/vncserver status
Xvnc (pid 9236) is running...

Output of the command ps -ef | grep vnc

[root@localhost ~]# ps -ef | grep vnc
root 8778 7938 0 03:29 pts/1 00:00:00 man vncviewer
root 8781 8778 0 03:29 pts/1 00:00:00 sh -c (cd "/usr/share/man/overrides" && (echo ".ll 16.1i"; echo ".nr LL 16.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/overrides/man1/vncviewer.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c -mandoc 2>/dev/null | /usr/bin/less -is)
root 8782 8781 0 03:29 pts/1 00:00:00 sh -c (cd "/usr/share/man/overrides" && (echo ".ll 16.1i"; echo ".nr LL 16.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/overrides/man1/vncviewer.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c -mandoc 2>/dev/null | /usr/bin/less -is)
root 9236 1 0 03:47 pts/1 00:00:00 /usr/bin/Xvnc :2 -desktop localhost.localdomain:2 (root) -auth /root/.Xauthority -geometry 800x600 -rfbwait 30000 -rfbauth /root/.vnc/passwd -rfbport 5902 -fp catalogue:/etc/X11/fontpath.d -pn -nolisten tcp -localhost
root 9243 9241 0 03:47 pts/1 00:00:00 vncconfig -iconic
root 9449 7938 0 03:49 pts/1 00:00:00 man vncviewer
root 9452 9449 0 03:49 pts/1 00:00:00 sh -c (cd "/usr/share/man/overrides" && (echo ".ll 16.1i"; echo ".nr LL 16.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/overrides/man1/vncviewer.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c -mandoc 2>/dev/null | /usr/bin/less -is)
root 9453 9452 0 03:49 pts/1 00:00:00 sh -c (cd "/usr/share/man/overrides" && (echo ".ll 16.1i"; echo ".nr LL 16.1i"; echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/overrides/man1/vncviewer.1.gz'; echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl | /usr/bin/nroff -c -mandoc 2>/dev/null | /usr/bin/less -is)
root 9481 7938 0 03:50 pts/1 00:00:00 vi .vnc/localhost.localdomain:2.log
root 10304 7938 0 06:10 pts/1 00:00:00 grep vnc

I dont know how to open a port

output of netstat -ntlp | grep 5900
[root@localhost ~]# netstat -ntlp | grep 5900
tcp 0 0 :::5900 :::* LISTEN 9342/vino-server

i think its Ok ?

mostlyharmless 01-19-2014 08:43 AM

Quote:

I dont know how to open a port
make sure /etc/services has a line with vino-server or vnc and port 5900 or 5901 or whichever.

Quote:

netstat -ntlp | grep 5900
tcp 0 0 :::5900 :::* LISTEN 9342/vino-server

i think its Ok ?
Looks OK, but I was thinking from another machine, you would do

Code:

nmap 192.168.1.567
or whatever your machine's ip address is; I guess it comes to the same thing.

I suppose you could look in the logs for the error messages when you try to connect; there might be something there. I haven't used vino in a while, but I seem to recall that when you first install it you have to click something in the GUI interface to make it go. Usually I just start vncserver with the command "vncserver" after using ssh to get in, and with the ports tunneled. Sorry I don't have any other bright ideas.

vijaybhandari 01-19-2014 10:56 PM

i had checked the logs and found the error
now vncserver is working fine

Thanks for your advice
I am marking this thread as solved


All times are GMT -5. The time now is 12:46 AM.