Re: How do we free a port number (303 Views)
Reply
Occasional Contributor
Kumar Sumit
Posts: 4
Registered: ‎12-08-2004
Message 1 of 4 (303 Views)
Accepted Solution

How do we free a port number

We are running a banking application and there are backend services that run at a particular port number ie poll for a data.

These port numbers are contacted by the front end services which sends messages at these port numbers.

To restart these services the port has to be free.There is an issue today.
There are established connections to the ports numbers and we are unable to start the services.

We are on HPUX superdomes HP-UX dcfngm01 B.11.11 U 9000/800 309255211 unlimited-user license

can you let us know what needs to be done to free a connection at a port.

Regards
Honored Contributor
Sridhar Bhaskarla
Posts: 6,350
Registered: ‎08-15-2001
Message 2 of 4 (303 Views)

Re: How do we free a port number

Kumar,

In order to free the port, you will need to stop the process that is responsible for spawning that port.

'lsof' can help you in that aspect. If you know specific ports, you can find the information using

lsof -i tcp:
lsof -i udp:

Will give you information for only those ports.

You can get lsof from the following site.

http://the-other.wiretapped.net/security/host-security/lsof/binaries/hpux/

Do not use any 'ndd' unsupported commands to disconnect the ports unless you know exactly what you are doing. So, I am not going to mention them here.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Respected Contributor
R. Sri Ram Kishore_1
Posts: 567
Registered: ‎04-05-2004
Message 3 of 4 (303 Views)

Re: How do we free a port number

Hi,

Take a look at this thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=233507

HTH.

Regards,
Sri Ram
"What goes up must come down. Ask any system administrator."
Honored Contributor
rick jones
Posts: 3,814
Registered: ‎12-02-1996
Message 4 of 4 (303 Views)

Re: How do we free a port number

A server that cannot bind to its well-known port upon restart, likely as not has a bug where it is _not_ setting SO_REUSEADDR on the socket before it calls bind().
there is no rest for the wicked yet the virtuous have no pillows
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.