LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2008, 03:22 AM   #1
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Rep: Reputation: 15
Question Problem in VNC remote connection - strange


Hello all,

There is a really weird problem I have. I setup a vnc some days back. I setup 4 accounts. everything worked fine then, I was able to connect to vnc via remote desktops. Now I am trying to add a 5th one and its not working, saying
Code:
main:        unable to connect to host: Connection refused (111)
1. I setup the /etc/sysconfig/vncservers file. For 5 accounts, I have acc1:1, acc2:2, acc3:3, acc4:4, acc5:5.

2. I edited the xstartup file for the new account. Uncommented those two lines.

3. I opened up the port 5905 in iptables.

4. I restarted both iptables and vncserver services.

What else is left that I am missing, or am I doin something wrong?
 
Old 10-23-2008, 04:08 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well is Xvnc listening on that port? run "netstat -pant" to see everything that's on tcp.
 
Old 10-23-2008, 07:32 PM   #3
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Original Poster
Rep: Reputation: 15
This is the output for netstat command

Code:
[root@vik ~]# netstat -pant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name
tcp        0      0 0.0.0.0:775                 0.0.0.0:*                   LISTEN      2713/rpc.statd
tcp        0      0 0.0.0.0:5801                0.0.0.0:*                   LISTEN      7306/Xvnc
tcp        0      0 0.0.0.0:5901                0.0.0.0:*                   LISTEN      7306/Xvnc
tcp        0      0 0.0.0.0:111                 0.0.0.0:*                   LISTEN      2693/portmap
tcp        0      0 0.0.0.0:6001                0.0.0.0:*                   LISTEN      7306/Xvnc
tcp        0      0 192.167.1.12:21            0.0.0.0:*                   LISTEN      2919/vsftpd
tcp        0      0 127.0.0.1:631               0.0.0.0:*                   LISTEN      2843/cupsd
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      2994/sendmail: acce
SO I guess, its not listening on port 5905.How can I resolve this now?

Quote:
Originally Posted by acid_kewpie View Post
well is Xvnc listening on that port? run "netstat -pant" to see everything that's on tcp.

Last edited by vikram8jp; 10-23-2008 at 07:34 PM.
 
Old 10-23-2008, 08:12 PM   #4
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Original Poster
Rep: Reputation: 15
I am able to connect to FTP through that account. Why not VNC?
 
Old 10-23-2008, 08:43 PM   #5
vikram8jp
LQ Newbie
 
Registered: Oct 2008
Location: Tokyo
Distribution: CentOS
Posts: 27

Original Poster
Rep: Reputation: 15
Lightbulb

Ok. I solved this problem. Am not exactly sure though how it got fixed.

I tried connecting by giving the port number, that worked.
Code:
[root@vik ~]# vncviewer localhost:5905:5
But now when I try without the port no., then also its working. I am not sure what happened.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using VNC and remote desktop connection pilotgi SUSE / openSUSE 4 11-16-2007 03:31 PM
A Strange - 421 Service not available, remote server has closed connection - problem vincelaw Linux - Networking 1 03-14-2007 02:43 PM
Keep losing connection to remote machine through SSH/VNC cav Linux - Networking 3 04-23-2006 07:12 PM
VNC Connection Problem karym6 Linux - Software 3 04-20-2004 01:41 PM
Remote Desktop Connection(control) for Linux!!!(VNC-Virtual Network computing)!!! AskMe Linux - Newbie 3 08-14-2003 04:15 PM


All times are GMT -5. The time now is 12:33 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