diff --git a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java index f058a6a38..0e833f984 100644 --- a/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java +++ b/apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java @@ -7,6 +7,7 @@ import java.io.FilenameFilter; import java.io.IOException; import java.net.InetAddress; import java.net.Inet4Address; +import java.net.InetSocketAddress; import java.net.ServerSocket; import java.security.KeyStore; import java.util.HashMap; @@ -311,13 +312,20 @@ public class RouterConsoleRunner { // Test before we add the connector, because Jetty 6 won't start if any of the // connectors are bad InetAddress test = InetAddress.getByName(host); - ServerSocket testSock = null; if ((!hasIPV6) && (!(test instanceof Inet4Address))) throw new IOException("IPv6 addresses unsupported"); if ((!hasIPV4) && (test instanceof Inet4Address)) throw new IOException("IPv4 addresses unsupported"); + ServerSocket testSock = null; try { - testSock = new ServerSocket(0, 0, test); + // On Windows, this was passing and Jetty was still failing, + // possibly due to %scope_id ??? + // https://issues.apache.org/jira/browse/ZOOKEEPER-667 + //testSock = new ServerSocket(0, 0, test); + // so do exactly what Jetty does in SelectChannelConnector.open() + testSock = new ServerSocket(); + InetSocketAddress isa = new InetSocketAddress(host, 0); + testSock.bind(isa); } finally { if (testSock != null) try { testSock.close(); } catch (IOException ioe) {} } @@ -369,7 +377,11 @@ public class RouterConsoleRunner { throw new IOException("IPv4 addresses unsupported"); ServerSocket testSock = null; try { - testSock = new ServerSocket(0, 0, test); + // see comments above + //testSock = new ServerSocket(0, 0, test); + testSock = new ServerSocket(); + InetSocketAddress isa = new InetSocketAddress(host, 0); + testSock.bind(isa); } finally { if (testSock != null) try { testSock.close(); } catch (IOException ioe) {} } diff --git a/history.txt b/history.txt index 379d01c4c..848b4c765 100644 --- a/history.txt +++ b/history.txt @@ -1,3 +1,13 @@ +2012-03-26 zzz + * Code cleanups: + - Remove unused imports + - Remove unused local variables + - Remove unused private fields + - Remove unnecessary casts + * Console: + - Try again to fix console on Windows w/o IPv6 (ticket # 621) + - Move oldconsole rendering from Router to OldConsoleHelper + 2012-03-24 zzz * GarlicConfig: Remove more unused methods * i2psnark: diff --git a/router/java/src/net/i2p/router/RouterVersion.java b/router/java/src/net/i2p/router/RouterVersion.java index 43dca9240..9319fc01c 100644 --- a/router/java/src/net/i2p/router/RouterVersion.java +++ b/router/java/src/net/i2p/router/RouterVersion.java @@ -18,7 +18,7 @@ public class RouterVersion { /** deprecated */ public final static String ID = "Monotone"; public final static String VERSION = CoreVersion.VERSION; - public final static long BUILD = 21; + public final static long BUILD = 22; /** for example "-test" */ public final static String EXTRA = "";