HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

How to release a locked port number

 
kvsheejith
Advisor

How to release a locked port number

I am using hp unix 11.0. If i restart some of my applications it's port number is getting locked, For example i have UGS application and it's port number is 28000, if i am restarting my UGS application hpux will not able to release the port for re-use.

How do i release one locked port number in HPunix?
7 REPLIES
Robert-Jan Goossens
Honored Contributor

Re: How to release a locked port number

Hi,

Try to locate the process with lsof keeping this port locked.

http://mirrors.develooper.com/hpux/lsof-4.80-11.00.sd.bz

# lsof -i tcp:28000

Regards,
Robert-Jan
rick jones
Honored Contributor

Re: How to release a locked port number

"Locked" probably isn't quite the correct term.

Unless the application sets SO_REUSEADDR() before calling bind() with the well-known port number, not only will any previous instance of the application with a socket bound to that port need to be closed, but also (IIRC) all the TCP endpoints in TIME_WAIT etc will have to clear-out.

And since you mention 11.0, "insert usual suggestion to upgrade to a supported OS revision here" :)
there is no rest for the wicked yet the virtuous have no pillows
Kapil Jha
Honored Contributor

Re: How to release a locked port number

well port is used only if some process is accessing it.
Probably you may stop the service and then try
lsof to find which process is using this port.
Kill that process and restart the process.
Should help.
Anyways 11.00 is out of support, you should upgrade you OS.

BR,
Kapil+
I am in this small bowl, I wane see the real world......
kvsheejith
Advisor

Re: How to release a locked port number



I am able fix that problem.

Thanks lot.
Sunny123_1
Esteemed Contributor

Re: How to release a locked port number

Hi



whats is that??? If you are now able to fix that problem then you should explain here what is the solution you got so in future it can help others if same problem occurs.

Regards
Sunny
kvsheejith
Advisor

Re: How to release a locked port number


First i made my application down and

In /vat/tmp/ one lock file will be there which ends with my application name that i have deleted

Then started my application and it started with out any issues

My application is UGS software.

Thanks
Sheejith
Horia Chirculescu
Honored Contributor

Re: How to release a locked port number

The existence of some lock file for any application does not mean that the port that it is used by that server application is locked!

Best regards
Horia.
Best regards from Romania,
Horia.