[jira] [Commented] (HBASE-6822) [WINDOWS] MiniZookeeperCluster multiple daemons bind to the same port
[ https://issues.apache.org/jira/browse/HBASE-6822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=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
[jira] [Commented] (HBASE-6822) [WINDOWS] MiniZookeeperCluster multiple daemons bind to the same port
[ https://issues.apache.org/jira/browse/HBASE-6822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13493623#comment-13493623 ] Hudson commented on HBASE-6822: --- Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #253 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/253/]) 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
[jira] [Commented] (HBASE-6822) [WINDOWS] MiniZookeeperCluster multiple daemons bind to the same port
[ https://issues.apache.org/jira/browse/HBASE-6822?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13465186#comment-13465186 ] Hadoop QA commented on HBASE-6822: -- -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12546124/hbase-6822_v1-trunk.patch against trunk revision . +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 hadoop2.0. The patch compiles against the hadoop 2.0 profile. -1 javadoc. The javadoc tool appears to have generated 140 warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. -1 findbugs. The patch appears to introduce 6 new Findbugs (version 1.3.9) warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed these unit tests: Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/2950//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2950//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2950//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop1-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2950//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2950//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/2950//artifact/trunk/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/2950//console This message is automatically generated. [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 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