----- Original Message -----
From: "凌晨" <[EMAIL PROTECTED]>
To: "Hieu Phan Thanh" <[EMAIL PROTECTED]>
Sent: Tuesday, October 17, 2006 3:13 PM
Subject: Re: A Question About Port Stucking
Hello,
Unfortunately,I have already invoke the unbindAll() method,which is
still useless :( (I did even recycle all the connections by invoking every
IoSession's close())
It's A MINA's BUG I dare to say cause other Open Source Projects like
MINA,take QuickServer 4 example,which doesn't possess this problem.
So what I supposed to do when the server is hung?I just cann't restart the
server immediately,which is very important.
Thanks for your kind reply.
Best wishes,
James Ling
----- Original Message -----
From: "Hieu Phan Thanh" <[EMAIL PROTECTED]>
To: "??" <[EMAIL PROTECTED]>
Sent: Tuesday, October 17, 2006 2:46 PM
Subject: RE: A Question About Port Stucking
Hello,
I used to encounter this problem before. I don't know how to fix too.
I think that the "setReuseAddress()" is not worked in inter-process.
The process 1 is listening on Port1 => kill this process 1 => the Port1
still has not released yet.
So the process 2 could not listen on that port due to "Address already in
use".
I think that we have to release the requested resource ("unbind" the
listening port). MINA has support us to do that.
Hope I could help u something.
Thanks & best regards,
Hieu Phan.
________________________________________
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Monday, October 16, 2006 4:33 PM
To: Hieu Phan Thanh
Subject: A Question About Port Stucking
Dear Phan Thanh:
Sorry to bother you.A server was biult on MINA0.9.4,JDK1.5,which is
running on Linux system(red hat).When the server listening on port to
accept connections
that come from WAN.After some time,when there are almost connections
established to this server,I stop the server using "kill" command,then I
find there are many connections still bound to
the port.So if I restart the server there will be a "address already in
use" exception thrown.I check the port use "netstat" command then to find
many conneciton in "TIME_WAIT" ,"FIN_WAIT1" AND "FIN_WAIT2"
state.
The reuseaddr option of the server is enabled by ((SocketAcceptorConfig)
config).setReuseAddress(true);
And Every incoming connection I also so the same thing
((SocketSessionConfig) session.getConfig()).setReuseAddress(true);
But It still does't work.
Have you ever happen to meet this situation?
Thanks In advance!