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

How to free up a particular port in solaris

587 views
Skip to first unread message

Ananda Rao

unread,
Nov 9, 2001, 6:40:02 AM11/9/01
to
hi
I am facing a problem with freeing up of ports in solaris. i
installed my directory server at port 389. if i stop my server, the
port 389 becoming free. but if i want to uninstall directory the
directory server should be up. once i uninstall and try to install it
again it is saying the port 389 is already in use. apart stoping
server can i free up a port using any command
thanks in advance
regards
Ananda Rao

Tim Campbell

unread,
Nov 9, 2001, 11:56:41 AM11/9/01
to
Type "netstat -na | grep 389" and see what state the port is in.

If a port isn't shut down nicely then it can hang around waiting for the
TIME_WAIT to expire (4 minutes by default but you can tune this).

If you definitely shut down your directory and there's no process
hanging around (do a "ps -ef" and grep for the process) then the port
*will* free up eventually. You cannot force it to free up faster (well,
I suppose you *could* reboot, but that would be silly).

Tune your TIME_WAIT interval down by doing (as root)
ndd -set /dev/tcp tcp_time_wait_interval 60000 (default value is
240000 - time is in milliseconds. I don't suggest tuning lower than 60
seconds unless you really know what you're doing.)

You should shut the directory down nicely before uninstalling any
software. This is probably why it's haning around (it was probably
abruptly killed). Uninstalling software does not *necesssarily* stop
the processes associated with it.

Regards
Tim

0 new messages