We're hitting BindExceptions a lot in precheckin runs. Another engineer
mentioned that he's seen port reuse (bind, unbind, repeat) fail even on
linux distros (not just windows).
Also, some of the discussions about BindException online seem to have
solutions involve using setReuseAddress(true) on linux.
I think we may need to change the following code in com.gemstone.gemfire.
internal.AvailablePort to call setReuseAddress(true) regardless of the OS.
Opinions?
197: server = new ServerSocket();
198: String osName = System.getProperty("os.name");
199: if(osName != null && !osName.startsWith("Windows")) {
200: server.setReuseAddress(true);
201: }
202: if (addr != null) {
203: server.bind(new InetSocketAddress(addr, port));
204: }
205: else {
206: server.bind(new InetSocketAddress(port));
207: }
I'm going to try removing the conditional on line 199 and run precheckin.
Is there any additional kernel configuration settings on linux that might
affect this behavior as well?
-Kirk