SUMMARY: bind: Address already in use

From: bill.walker@db.com
Date: Tue Oct 27 1998 - 15:44:13 CST


On Tue, 27 Oct 1998 bill.walker@db.com wrote:

We have a 2.5.1 Enterprise4000 which runs Applix AXnNet.
The AXnet process has the tendancy to die from time to time, leaving the
port(s) open. You cannot restart AXnet
until these port(s) timeout.
However, asking Equities Traders to "wait ten or fifteen minutes" does not
go down too well, and we end up shutting
down Oracle and rebooting the server. AXnet then starts OK.
This is what happens when we try to run our AXnet start script....

sgrvr1 root # ./axnet_chk
+ ps -ef
+ grep axnet
+ grep -v grep
+ grep -v axnet_chk
+ [ 1 -ne 0 ]
+ export TNS_ADMIN=/us000/oracle/product/admin/RVR/tns_admin
+ /usr/bin/axnet
bind: Address already in use
+ exit

This is what netstat reports :
sgrvr1 root # netstat -a | grep ax
srvr1.lon.db.axnet ws2.qnt..lon.db.1310 1 0 9216 0
ESTABLISHED

Is there anything I can do (reasonable quickly / cleanly ) to clear the
port or get around the "bind: Address already in use"
problem. ?

***************************************************************************
******************************************************************

I had a few good responses, which I'll have to wait for a re-occurence to
test ( and re-summarize) ;

++++ From John P Dodge@boeing.com
Bill:
     Get lsof from ftp://vic.cc.purdue.edu/pub/tools/unix/lsof/ and
then use the command lsof -i to print open ports and the processes holding
them. If you know the port number use "lsof -i \:<port #>" then kill the
process holding the port.

++++ The same vein from Casper Dik

If there's still an axnet connection in ESTABLISHED mode, there must be
a process that has the socket open.

Try lsof to hunt it down.

+++++ Something more AXnet related

Bill,

Try removing /tmp/.ax*, that should clear up the "bind: address already in
use" problem.

_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/

Kurt Werth werth@cs.lmco.com 607-770-3501 /
8-255-3501
Lockheed Martin Control Systems 600 Main Street, Johnson City, NY
13790

_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/
_/

++++ Also, from kriss@fnal.gov

Well I don't know if it will help but there is software, lsof, that might
be able to identify which process is holding open the port.

ftp://vic.cc.purdue.edu/pub/tools/unix/lsof

michael

++++ From Steve at pcs.co.uk

Bill,

     The Axnet process creates named sockets in /tmp called .axnetipc and
     .axsc4. If you remove these you can re-start axnet straight away.

Best Regards,

Steve Butterfield.



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:51 CDT