LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 12-04-2011, 01:43 PM   #1
Gil@LQ
Member
 
Registered: Apr 2010
Location: India /Hyderabad
Distribution: RedHat, CentOS
Posts: 273

Rep: Reputation: 1
unable to connect to socket connection refused 111: Tiger vnc


hi,

installed tigervnc server on centos 6 64bit which one of my virtual machine on rhel6 host. when i try to connect centos vm from rhel6 using tiger vnc viwer it says

"unable to connect to socket connection refused 111". i added root user in /etc/sysconfig/vncserver, started the vncserver on centos, disbabled SElinux. but same error. Please help me.
thnks in adv.
 
Old 12-04-2011, 02:59 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,818

Rep: Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005Reputation: 1005
Have you opened that port in your firewall?
 
Old 12-05-2011, 03:57 AM   #3
Gil@LQ
Member
 
Registered: Apr 2010
Location: India /Hyderabad
Distribution: RedHat, CentOS
Posts: 273

Original Poster
Rep: Reputation: 1
ya i opened 111 port for all the hosts, but same error. is there any other thing i could do to make it work .
thank you.
 
Old 03-29-2012, 11:30 AM   #4
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
I know this is old, but when I ran into this issue today this was one of the top posts that came up.
Here is what I did on a SL 6.2 Box
1. Turn on VNC Server.
Code:
chkconfig vncserver on
2.
Code:
service vncserver start
I got a no displays configured error.
a. run as the user you want to use for vnc
Code:
vncserver
b. it will set up your password and files.
3.
Code:
service vncserver start
4. Now I was getting the error that the OP mentions.
a. unable to connect to socket connection refused 111: Tiger vnc
5. I searched around and found some folks saying to turn off the firewall. I had already enabled 5900 - 5910 on the firewall. So I decided to check what port VNC Server was using.
Code:
[root@localhost ~]# lsof -i -P | grep -i "listen" | grep Xvnc
Xvnc      3031 vncuser    0u  IPv6  22109      0t0  TCP *:6001 (LISTEN)
Xvnc      3031 vncuser    1u  IPv4  22110      0t0  TCP *:6001 (LISTEN)
Xvnc      3031 vncuser    6u  IPv4  22116      0t0  TCP *:5901 (LISTEN)
There is the port I needed to open 6001.

I hope this helps someone out there if so hit my karma button <---
 
Old 03-30-2012, 08:49 AM   #5
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
netstat -putna |grep LISTEN |grep vnc should do the trick

but frankly, the right solution is `vncserver -list` where every number returned should be added to 5900 to get the port, or fed directly to vncviewer as the display number
 
Old 03-30-2012, 09:11 AM   #6
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Quote:
Originally Posted by dyasny View Post
netstat -putna |grep LISTEN |grep vnc should do the trick

but frankly, the right solution is `vncserver -list` where every number returned should be added to 5900 to get the port, or fed directly to vncviewer as the display number
That is one thing that is strange about this I don't actually connect using the 6001 port that had to be added to the firewall rules. It just had to be added before I could connect on 5900 +. I must admit that I have not done the proper research on the vncserver -options just went with a quick down and dirty port listing. Thanks for the reply it is easier to remember then my grep command.
 
Old 03-30-2012, 09:22 AM   #7
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
for VNC you need to open a range of ports, starting at 5900 and ending at 5900 + the amount of sessions you intend to allow. 6001 is simply session number 101
 
Old 03-30-2012, 09:28 AM   #8
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Yeah, but the port I connect on is one I already had open and cant actually connect on 6001 so I am wondering if it is some sort of loopback session, I couldn't even guess if such a thing exists. Once I allowed it through my firewall I could connect on one of the previously opened ports 5901.
 
Old 03-30-2012, 09:34 AM   #9
Sydney
Member
 
Registered: Mar 2012
Distribution: Scientific Linux
Posts: 147

Rep: Reputation: 36
Okay further reading leads me to believe being lazy and using the out of the box configs was my issue. Evidently you can limit the session to be what port you like in the config, by leaving it open it must have been trying to open a predefined number of sessions to flip to as users connect. Kind of like child servers waiting to be used.
 
Old 03-30-2012, 11:32 AM   #10
dyasny
Member
 
Registered: Dec 2007
Location: Canada
Distribution: RHEL,Fedora
Posts: 995

Rep: Reputation: 115Reputation: 115
just turned vncserver on here, and also got two ports - for display :2 I ot 5902 and 6002. Guess one is used for encrypted data and the other for non-encrypted. Same as with spice, but I'm just guessing here, need to look at the code or the internals documentation to verify this assumption
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Connection refused williatf Linux - Server 15 09-08-2017 03:01 AM
rsync: failed to connect to 192.168.1.1: Connection refused (111) stevewuiyi Linux - Server 2 12-10-2009 09:35 AM
(111) Connection refused - please help kambele Linux - Newbie 1 09-28-2009 11:44 AM
Socket Connection Failed: 111 Connection Refused degraffenried13 Linux - General 3 05-31-2009 01:17 AM
error: unable to connect to socket: Connection refused (111) ; Mukiri Linux - Newbie 1 05-04-2009 03:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 01:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration