Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 601BA10AEE for ; Sat, 16 Nov 2013 17:01:29 +0000 (UTC) Received: (qmail 88320 invoked by uid 500); 16 Nov 2013 17:01:28 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 88268 invoked by uid 500); 16 Nov 2013 17:01:27 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 88241 invoked by uid 99); 16 Nov 2013 17:01:24 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Nov 2013 17:01:24 +0000 Date: Sat, 16 Nov 2013 17:01:24 +0000 (UTC) From: "Ivan Bella (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-1903) Monitor creates a new ZK object to fetch gc status and doesn't wait for it to connect. 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/ACCUMULO-1903?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13824533#comment-13824533 ] Ivan Bella commented on ACCUMULO-1903: -------------------------------------- http://zookeeper.apache.org/doc/r3.3.3/api/org/apache/zookeeper/ZooKeeper.html#ZooKeeper(java.lang.String, int, org.apache.zookeeper.Watcher) > Monitor creates a new ZK object to fetch gc status and doesn't wait for it to connect. > -------------------------------------------------------------------------------------- > > Key: ACCUMULO-1903 > URL: https://issues.apache.org/jira/browse/ACCUMULO-1903 > Project: Accumulo > Issue Type: Bug > Components: monitor > Affects Versions: 1.5.0 > Reporter: John Vines > Assignee: Eric Newton > Labels: newbie > Fix For: 1.5.1, 1.6.0 > > > May affect older versions, didn't check them for the same code, but it does exist in 1.5.1-SNAPSHOT and 1.6.0-SNAPSHOT currently. > Seeing a warning in the monitor "Unable to contact the garbage collector at null", stemming from a KeeperException KeeperErrorCode ConnectionLoss in fetchGcStatus(). > Initially I thought this was just a connection error, but I took a look at the code and a quick google search led me to http://zookeeper-user.578899.n2.nabble.com/zookeeper-connection-loss-exception-occurs-on-new-created-ZooKeeper-instance-too-much-why-td6766831.html > In the getchGcStatus() we create a new ZooKeeper object with every call (!) and then immediately try to use it (!!) without waiting for it to finish establishing a connection. Because of these, I think we should A. ensure it's connected before attempting to use and B. try to reuse the same ZK object instead of creating a new one for each call. -- This message was sent by Atlassian JIRA (v6.1#6144)