Discussion Locked

Clearing ports

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
We have a process that uses port 8060, when we kill the process the port remains in use, the only way I've been able to clear it is to reboot. Is there a way to clear stuck port with out rebooting?

5 replies

by pvp

I don't know of a way to free the port.

My only guess is that if you're using kill -9, (kill -SIGKILL) you should try kill -15 (kill -SIGTERM) to see if the process cleans up in an orderly shutdown.

And, of course, if it's your own process anddoesn't clean up on SIGTERM, it needs a bit of rewrite.

by cdilipb

Try ndd utility with tcp_close_wait_interval set to 60000 (1 sec).

% ndd /dev/tcp \?
% ndd -get /dev/tcp tcp_close_wait_interval
default = 240000

% ndd -set tcp_close_wait_interval 60000

confirm change

% ndd -get /dev/tcp tcp_close_wait_interval

This discussion is closed to new replies.