You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by 凌晨 <cl...@netspeed-tech.com> on 2006/06/08 08:50:43 UTC
problem of MINA Server-Side on linux
Hi there
We built a server on mina framework then running in linux(red hat as4 update
2).Everytime We user 'kill' to stop this server there are always several tcp
connections in FINWAIT.In this condition we restart the server a address
already bind Exception will be thrown.So please tell me how to fix this
problem.Otherwise we can only restart the server after a long time,waiting
for the FINWAIT.Thanks a lot
Re: problem of MINA Server-Side on linux
Posted by Niklas Therning <ni...@trillian.se>.
Hi,
What version of MINA are you using? Which JRE?
If using MINA 0.9.4 you should make sure you set reuseAddress to true
when binding. This is a property in the SocketAcceptorConfig which you
can pass to bind()
SocketAcceptorConfig config = new SocketAcceptorConfig();
config.setReuseAddress(true);
acceptor = new SocketAcceptor();
acceptor.bind(address, handler, config);
Or you can call
((SocketAcceptorConfig ) acceptor.getDefaultConfig()).setReuseAddress(true)
before binding.
HTH
/Niklas
凌晨 wrote:
> Hi there
>
> We built a server on mina framework then running in linux(red hat as4 update
> 2).Everytime We user 'kill' to stop this server there are always several tcp
> connections in FINWAIT.In this condition we restart the server a address
> already bind Exception will be thrown.So please tell me how to fix this
> problem.Otherwise we can only restart the server after a long time,waiting
> for the FINWAIT.Thanks a lot
>
>