Operating System - HP-UX
1752483 Members
6009 Online
108788 Solutions
New Discussion юеВ

Re: How do we free a port number

 
Go to solution
Kumar Sumit
Occasional Contributor

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
3 REPLIES 3
Sridhar Bhaskarla
Honored Contributor
Solution

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
R. Sri Ram Kishore_1
Respected Contributor

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."
rick jones
Honored Contributor

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