X port in use

Duane Waddle waddle1 "at" us.ibm.com
Wed, 06 Jun 2001 14:30:50 +0000


Use lsof to see if you can tell what PID is bound to the TCP port you are
interested in.  Sun may not provide it as a standard tool, so here's the
source:  ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/lsof.tar.gz  It also
looks like sunfreeware.com has a recent package for it.

hope this helps..

--D

Duane Waddle
waddle1 "at" us.ibm.com
"With sufficient thrust, pigs fly just fine..."  -- RFC1925


Philip Andrew <pwa0202 "at" mail.com>@uk.research.att.com on 06/05/2001 12:20:04
PM

Please respond to vnc-list "at" uk.research.att.com

Sent by:  owner-vnc-list "at" uk.research.att.com


To:   vnc-list "at" uk.research.att.com
cc:
Subject:  X port in use



Hi --

I have several Sun Sparc systems running Solaris 8, and multiple users
who run VNC servers on those systems.  Each user is assigned a unique
display number for their exclusive use, using an NIS map (I have a
program that automatically looks up their display number, and starts up
a server on that display).

Generally, this works great.  However, occasionally I've had situations
where 'vncserver' thought there was a VNC server already running on that
display.  Tracing through the Perl code, I found that there were 3
situations in which this occurs:

   1. The previous server exited without deleting the socket file
      called '/tmp/.X11-unix/X<disp#>'
   2. 'bind' to port 60xx fails.
   3. 'bind' to port 59xx fails.

#1 is easy to fix -- it can happen if the server either (a) dies a
violent death, or (b) when the server is started, the permissions on
'/tmp/.X11-unix' are 777, and somehow get reset to 775 by the time the
server exits (yes, this is a strange one).  However, I have no idea how
to diagnose, let alone remedy, #2/#3 -- I have a case right now where
one of my users is trying to start a server on display :25, but there
seems to be something running on port 6025 (or at least, 'bind' fails
when trying to bind to that port).  In the past, "port-in-use" problems
have gone away when I've rebooted a system -- but I can't go rebooting
systems just to fix this!

I've searched the list archives and found no mention of this issue, so I
don't know if anyone else has encountered this.  But I only run into
this problem when using VNC -- I've previously had the problem with
display numbers :14, :15, and :18 (oh, and not always on the same system).

Any help in fixing this would be appreciated -- either in determining
what (if anything) is using port 6025, or in releasing port 6025 (if
it's a stale port or something) ...

Thanks.

-Phil
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to majordomo "at" uk.research.att.com
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------