[ https://issues.apache.org/jira/browse/HBASE-6822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13493606#comment-13493606 ]
Hudson commented on HBASE-6822: ------------------------------- Integrated in HBase-TRUNK #3522 (See [https://builds.apache.org/job/HBase-TRUNK/3522/]) HBASE-6822. [WINDOWS] MiniZookeeperCluster multiple daemons bind to the same port (Revision 1407286) Result = FAILURE enis : Files : * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/MiniZooKeeperCluster.java > [WINDOWS] MiniZookeeperCluster multiple daemons bind to the same port > --------------------------------------------------------------------- > > Key: HBASE-6822 > URL: https://issues.apache.org/jira/browse/HBASE-6822 > Project: HBase > Issue Type: Bug > Affects Versions: 0.94.3, 0.96.0 > Reporter: Enis Soztutar > Assignee: Enis Soztutar > Fix For: 0.96.0 > > Attachments: hbase-6822_v1-0.94.patch, hbase-6822_v1-trunk.patch > > > TestHBaseTestingUtility.testMiniZooKeeper() tests whether the mini zk cluster > is working by launching 5 threads corresponding to zk servers. > NIOServerCnxnFactory.configure() configures the socket as: > {code} > this.ss = ServerSocketChannel.open(); > ss.socket().setReuseAddress(true); > {code} > setReuseAddress() is set, because it allows the server to come back up and > bind to the same port before the socket is timed-out by the kernel. > Under windows, the behavior on ServerSocket.setReuseAddress() is different > than on linux, in which it allows any process to bind to an already-bound > port. This causes ZK nodes starting on the same node, to be able to bind to > the same port. > The following part of the patch at > https://issues.apache.org/jira/browse/HADOOP-8223 deals with this case for > Hadoop: > {code} > if(Shell.WINDOWS) { > + // result of setting the SO_REUSEADDR flag is different on Windows > + // http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx > + // without this 2 NN's can start on the same machine and listen on > + // the same port with indeterminate routing of incoming requests to > them > + ret.setReuseAddress(false); > + } > {code} > We should do the same in Zookeeper (I'll open a ZOOK issue). But in the > meantime, we can fix hbase tests to not rely on BindException to resolve for > bind errors. Especially, in MiniZKCluster.startup() when starting more than > 1 servers, we already know that we have to increment the port number. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira