[ 
https://issues.apache.org/jira/browse/HBASE-3755?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019061#comment-13019061
 ] 

Gary Helmling commented on HBASE-3755:
--------------------------------------

Do you think we need an additional check for 
KeeperException.ConnectionLossException at the bottom of 
ZooKeeperWatcher<init>?  This way we could perform the same cleanup as above.

So instead of:
{code:java}
    } catch (KeeperException e) {
      throw new ZooKeeperConnectionException(
          prefix("Unexpected KeeperException creating base node"), e);
    }
{code}

do something like:
{code:java}
    } catch (KeeperException e) {
      if (e instanceof KeeperException.ConnectionLossException) {
        try {
          this.zooKeeper.close();
        } catch (InterruptedException ie) {
          Thread.currentThread().interrupt();
          LOG.warn("Interrupted while closing", ie);
        }
      }
      throw new ZooKeeperConnectionException(
          prefix("Unexpected KeeperException creating base node"), e);
    }
{code}



> Catch zk's ConnectionLossException and augment error message with more help
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-3755
>                 URL: https://issues.apache.org/jira/browse/HBASE-3755
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.90.1
>            Reporter: Jean-Daniel Cryans
>            Assignee: Jean-Daniel Cryans
>             Fix For: 0.90.3
>
>         Attachments: HBASE-3755-v2.patch, HBASE-3755.patch
>
>
> 0.90 has a different behavior regarding ZK connections, it tends to create 
> too many of them and it's not obvious to users what they should do to fix. I 
> think I've helped at least 5 different users this week with this error.
> By catching ConnectionLossException and augmenting its message, we could say 
> something like "it's possible that the ZooKeeper server has too many 
> connections from this IP, see doc at blah" since the ZK server isn't nice 
> enough to let us know what's going on.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to