A quick try on my dev server shows a big difference with the following line added (thx Alex!)
nioSocketAcceptor.setReuseAddress(true); The "addr already used" problem is gone! I'll try it on the production server later. Zhijun -----Original Message----- From: Zhijun Sheng [mailto:[email protected]] Sent: Tuesday, June 02, 2009 7:47 AM To: [email protected] Subject: RE: java.net.BindException: Address already in use Hi, Alex, Thank you! But I think I used this line before and removed it later because I saw some posts in the forum saying that this is not necessary since a fix was made in mina. But anyway I'll add it back to see what happens. Thanks again from Toronto Zhijun -----Original Message----- From: Alexander Christian [mailto:[email protected]] Sent: Tuesday, June 02, 2009 7:35 AM To: [email protected] Subject: Re: java.net.BindException: Address already in use Hi Zhijun, try this: ---- nioSocketAcceptor.setReuseAddress(true); ---- best regards from Germany, Alex On Tue, 2 Jun 2009 06:46:29 -0400, "Zhijun Sheng" <[email protected]> wrote: > Hi, Community, > > > > I'm using mina 2.0.0 M5 on linux box. Every time I restarted the server > immediately after it was shut down, I got "java.net.BindException: Address > already in use". Have to wait for a few minutes to be able to restart the > server successfully. Really painful. > > > > This problem seems to be fixed long ago but don't know why I keep > encountering it. Is there any way to avoid this problem? > > > > Thanks a lot in advance! > > > > Zhijun
