Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Clearing AIX ports?

374 views
Skip to first unread message

eku...@apple.com

unread,
Feb 15, 2005, 8:30:43 PM2/15/05
to
Is there a way to clear a port on AIX without knowing what process is
using it?

When we try and start the Peoplesoft Tuxedo App Server often the boot
fails because of some port that's hung.

Laurenz Albe

unread,
Feb 16, 2005, 3:41:32 AM2/16/05
to
eku...@apple.com wrote:
> Is there a way to clear a port on AIX without knowing what process is
> using it?

Short of a reboot, no.
Think about it: if a port is in use, some process is using it.
If you'd 'steal' that port, you would probably crash that process.
I don't think you want to crash an unknown process, it might be an
important one.

> When we try and start the Peoplesoft Tuxedo App Server often the boot
> fails because of some port that's hung.

You should investigate the problem instead of using brute force.
Find out which process has the port in use (the lsof open source program
can help you a lot in this). Then decide if you need that process or not,
and if not, stop it gracefully and prevent it from restarting.

Your description is not very detailed, so your problem could also be
that the process which used the port is already gone, but the socket is
still in TIME_WAIT state. Sockets cannot be reused immediately by default,
that is to prevent certain kinds of attacks.

So maybe you just stopped the server and want to start it again, and run
into the timeout?

You see, I'm just guessing wildly. Analyze your situation, come up with
some more information, and maybe somebody can give you better help.

Yours,
Laurenz Albe

Ed Kulis

unread,
Feb 16, 2005, 12:57:55 PM2/16/05
to
Thanks Laurenz

Your wild guesses hit the mark.

I've got to find out how to determine which process is using the port.
After I kill all the ps -ef detectable procsess id's I sometimes still
can't boot Peoplesoft because the ports are hung.

I'll check into the time wait states and use the lsof command.

As to the brute force, we've reserved ports for Peoplesoft and when I'm
building a new decdicated server I know that I've hung the ports in the
range during the far greater than normal shutdown/startup cycles.

But your tips will help me understand the port usage better and that's
better in the long run.

Thanks again,

-ed

Mark Taylor

unread,
Feb 16, 2005, 2:18:29 PM2/16/05
to

Rajendra Singh

unread,
Feb 17, 2005, 5:24:54 PM2/17/05
to
On 15 Feb 2005 17:30:43 -0800, eku...@apple.com wrote:

>Is there a way to clear a port on AIX without knowing what process is
>using it?

Use "netstat -An", then rmsock (5.2+) to remove the socket.
--
Mr. Rajendra Singh

Mark Taylor

unread,
Feb 18, 2005, 5:21:56 AM2/18/05
to
rmsock is not just for 5.2+, it runs on 5.1 also. You need to grab the
PCB?ADDR from netstat -Aan (Col 1) for the proc then run

rmsock PCB tcpcb

If the address is in use you will get the proc name and PID, if its
not, then the sock will be removed.

0 new messages