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
> 
> 

Reply via email to