Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5833FD393 for ; Tue, 5 Mar 2013 06:27:19 +0000 (UTC) Received: (qmail 40787 invoked by uid 500); 5 Mar 2013 06:27:18 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 40493 invoked by uid 500); 5 Mar 2013 06:27:17 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 40255 invoked by uid 99); 5 Mar 2013 06:27:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 06:27:14 +0000 Date: Tue, 5 Mar 2013 06:27:14 +0000 (UTC) From: "Hudson (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HBASE-7111) hbase zkcli will not start if the zookeeper server chosen to connect to is unavailable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-7111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593112#comment-13593112 ] Hudson commented on HBASE-7111: ------------------------------- Integrated in HBase-TRUNK-on-Hadoop-2.0.0 #430 (See [https://builds.apache.org/job/HBase-TRUNK-on-Hadoop-2.0.0/430/]) HBASE-7111 hbase zkcli will not start if the zookeeper server chosen to connect to is unavailable (Zhou wenjian) (Revision 1452554) Result = FAILURE larsh : Files : * /hbase/trunk/hbase-server/src/main/java/org/apache/hadoop/hbase/zookeeper/ZooKeeperMainServerArg.java * /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/zookeeper/TestZooKeeperMainServerArg.java > hbase zkcli will not start if the zookeeper server chosen to connect to is unavailable > -------------------------------------------------------------------------------------- > > Key: HBASE-7111 > URL: https://issues.apache.org/jira/browse/HBASE-7111 > Project: HBase > Issue Type: Bug > Components: Zookeeper > Affects Versions: 0.94.2 > Reporter: Zhou wenjian > Assignee: Zhou wenjian > Fix For: 0.95.0, 0.98.0, 0.94.6 > > Attachments: HBASE-7111-trunk.patch, HBASE-7111-trunk-v2.patch > > > there are 3 zookeeper servers in my cluster. > s1 > s2 > s3 > after killing s3, i found the hbase zkcli will not start again. > it will try to connect to s3 continuely. > /11/07 11:01:01 INFO zookeeper.ClientCnxn: Opening socket connection to server s3 > 12/11/07 11:01:01 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect > java.net.ConnectException: Connection refused > from the code > {code} > public String parse(final Configuration c) { > // Note that we do not simply grab the property > // HConstants.ZOOKEEPER_QUORUM from the HBaseConfiguration because the > // user may be using a zoo.cfg file. > Properties zkProps = ZKConfig.makeZKProps(c); > String host = null; > String clientPort = null; > for (Entry entry: zkProps.entrySet()) { > String key = entry.getKey().toString().trim(); > String value = entry.getValue().toString().trim(); > if (key.startsWith("server.") && host == null) { > String[] parts = value.split(":"); > host = parts[0]; > } else if (key.endsWith("clientPort")) { > clientPort = value; > } > if (host != null && clientPort != null) break; > } > return host != null && clientPort != null? host + ":" + clientPort: null; > } > {code} > the code will choose the fixed zookeeper server (here is the unavailable s3), which leads to the script fails -- 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