LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-19-2005, 01:52 PM   #1
greauxe
LQ Newbie
 
Registered: Jul 2005
Posts: 19

Rep: Reputation: 0
VNC with SSH - won't release the port


Using Fedora 4. I issued the command "ssh -g -L 5901:localhost:5902 mydomain.com" to enable secure vnc connection.

Now I killed the vnc connection, to restart for another user, but the port won't release! I killed the PID of ssh, sshd, xinetd, vnc, etc. When I try to reissue the command, I get "bind: Address already in use".

I also deleted the .X11, etc lock files, and the lock files under ~.vnc/.

I tried rebooting also, still get same problem.

Is there a way to tel bind to release the port?

Help!
 
Old 08-19-2005, 02:02 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Can you post the output from:
netstat -nlp
 
Old 08-19-2005, 03:38 PM   #3
greauxe
LQ Newbie
 
Registered: Jul 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:2401 0.0.0.0:* LISTEN 3110/xinetd
tcp 0 0 0.0.0.0:32769 0.0.0.0:* LISTEN 1805/rpc.statd
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 2296/mysqld
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN 2434/smbd
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1787/portmap
tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 2524/perl
tcp 0 0 0.0.0.0:5555 0.0.0.0:* LISTEN 2393/dc_server
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 2118/cupsd
tcp 0 0 127.0.0.1:5335 0.0.0.0:* LISTEN 2100/mDNSResponder
tcp 0 0 0.0.0.0:90 0.0.0.0:* LISTEN 2660/httpd
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 2338/sendmail: acce
tcp 0 0 0.0.0.0:7741 0.0.0.0:* LISTEN 2445/lisa
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN 2434/smbd
tcp 0 0 :::993 :::* LISTEN 2320/dovecot
tcp 0 0 :::995 :::* LISTEN 2320/dovecot
tcp 0 0 :::5901 :::* LISTEN 5575/ssh
tcp 0 0 :::110 :::* LISTEN 2320/dovecot
tcp 0 0 :::143 :::* LISTEN 2320/dovecot
tcp 0 0 :::80 :::* LISTEN 2361/httpd
tcp 0 0 :::22 :::* LISTEN 3627/sshd
tcp 0 0 :::443 :::* LISTEN 2361/httpd
udp 0 0 0.0.0.0:32768 0.0.0.0:* 1805/rpc.statd
udp 0 0 192.168.0.3:137 0.0.0.0:* 2437/nmbd
udp 0 0 0.0.0.0:137 0.0.0.0:* 2437/nmbd
udp 0 0 192.168.0.3:138 0.0.0.0:* 2437/nmbd
udp 0 0 0.0.0.0:138 0.0.0.0:* 2437/nmbd
udp 0 0 0.0.0.0:10000 0.0.0.0:* 2524/perl
udp 0 0 0.0.0.0:7741 0.0.0.0:* 2445/lisa
udp 0 0 0.0.0.0:68 0.0.0.0:* 1736/dhclient
udp 0 0 0.0.0.0:709 0.0.0.0:* 1805/rpc.statd
udp 0 0 0.0.0.0:5353 0.0.0.0:* 2100/mDNSResponder
udp 0 0 0.0.0.0:111 0.0.0.0:* 1787/portmap
udp 0 0 0.0.0.0:631 0.0.0.0:* 2118/cupsd
raw 1296 0 0.0.0.0:1 0.0.0.0:* 7 2445/lisa
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 6924 2479/hald @/tmp/hald-local/dbus-HsrSPPb9gm
unix 2 [ ACC ] STREAM LISTENING 6138 2109/acpid /var/run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 6712 2377/dc_client /var/cache/mod_ssl/distcache
unix 2 [ ACC ] STREAM LISTENING 6814 2426/xfs /tmp/.font-unix/fs7100
unix 2 [ ACC ] STREAM LISTENING 6576 2320/dovecot /var/run/dovecot-login/default
unix 2 [ ACC ] STREAM LISTENING 6902 2468/dbus-daemon /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 6461 2296/mysqld /var/lib/mysql/mysql.sock
 
Old 08-20-2005, 06:19 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It looks like the port is still in use - try killing the ssh process:
kill -9 5575

Then start the forwarding process again.
 
Old 08-20-2005, 01:42 PM   #5
greauxe
LQ Newbie
 
Registered: Jul 2005
Posts: 19

Original Poster
Rep: Reputation: 0
Nope. I tried that already. I killed the process, ensured it died, saw no indication anywhere that ssh is running (ps -A; netstat -nlp, etc) and as soon as I try the command again, it tells me the port is not available.

OH, also, I can start vncserver normally, without specifying a port, and it will give start with port :1 with np; but not through ssh.

This is a tricky one. may be a bug.

bind: Address already in use
channel_setup_fwd_listener: cannot listen to port: 5901
Could not request local forwarding.

Last edited by greauxe; 08-20-2005 at 02:46 PM.
 
  


Reply



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
Delay in HTTP Port Release sudhasmyle Linux - Networking 3 06-15-2005 01:14 PM
ssh with vnc Dillius Linux - Security 1 03-11-2005 04:53 PM
VNC over SSH or ????? alirezan1 Mandriva 2 01-04-2005 10:55 AM
vnc with ssh lawkh Linux - Newbie 1 02-10-2004 01:12 AM
vnc over ssh on port 1352--> wrong authentication...? pablovschby Linux - Networking 0 01-07-2004 11:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:10 PM.

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
Open Source Consulting | Domain Registration