1754172 Members
3243 Online
108811 Solutions
New Discussion юеВ

Port hung issue

 
core dump for memmove
Occasional Contributor

Port hung issue

I just killed my application that uses a port 57001 . After that i restated the same application but it is not comming up. I suspect that this port was hung as i found using netstat command as follows :
netstat -an | grep -i 57001
tcp 0 0 *.57001 *.* LISTEN
tcp 0 0 127.0.0.1.57001 127.0.0.1.63275 CLOSE_WAIT
tcp 0 0 127.0.0.1.63562 127.0.0.1.57001 FIN_WAIT_2
tcp 0 0 127.0.0.1.63507 127.0.0.1.57001 FIN_WAIT_2
tcp 0 0 127.0.0.1.63448 127.0.0.1.57001 FIN_WAIT_2
tcp 0 0 127.0.0.1.57001 127.0.0.1.63507 CLOSE_WAIT
tcp 0 0 127.0.0.1.57001 127.0.0.1.63448 CLOSE_WAIT
tcp 0 0 127.0.0.1.57001 127.0.0.1.63562 CLOSE_WAIT
tcp 0 0 127.0.0.1.63336 127.0.0.1.57001 FIN_WAIT_2
tcp 0 0 127.0.0.1.63392 127.0.0.1.57001 FIN_WAIT_2
tcp 0 0 127.0.0.1.63275 127.0.0.1.57001 FIN_WAIT_2
tcp 0 0 127.0.0.1.57001 127.0.0.1.63336 CLOSE_WAIT
tcp 0 0 127.0.0.1.57001 127.0.0.1.63392 CLOSE_WAIT


How to clear this port 57001

I used lsof -i tcp:57001

it has not shown any process id that used this port 57001.

PLease help me in this regards.

Sudhansu
3 REPLIES 3
ankitj1983
Frequent Advisor

Re: Port hung issue

Hello Sudhansu,

Can you give me the output when you are trying to start the application.

Regards

Ankit
Michael Steele_2
Honored Contributor

Re: Port hung issue

Hi

What is attached to your local host reserved ip 127.0.0.1? As 127.0.0.1.57001 is attached? And 127.0.0.63336 is attached? And 127.0.0.1.63392 is attached. Etc.

Review you netstat for 127.0.0.1.
Support Fatherhood - Stop Family Law
Benoy Daniel
Trusted Contributor

Re: Port hung issue

try this to clear the WAIT sessions.

ndd -get /dev/tcp tcp_status | grep | grep TCP_FIN_WAIT_2 | awk '{print $1}'
do
ndd -set /dev/tcp tcp_discon 0x${i}
if [ $? -eq 0 ]
then
echo "Cleared $i"
else
echo "Unable to clear $i"
fi
done