accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Turner (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-131) ZookeeperInstance gets stuck when given bad host
Date Wed, 10 Oct 2012 00:36:02 GMT

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

Keith Turner commented on ACCUMULO-131:
---------------------------------------

I am able to reproduce in 1.4 branch with the following simple test program.   Zookeeper is
not running on port 5689.

{code:java}
import org.apache.accumulo.core.client.ZooKeeperInstance;

public class TestZK {
  public static void main(String[] args) throws Exception {
    ZooKeeperInstance zki = new ZooKeeperInstance("test14", "localhost:5689");
  }  
}
{code}


ZooSession never sees a ConnectException as this ticket describes.  That may have been 1.3
behavior.  Internal zookeeper code sees this exception, and logs it.  ZooSession sees that
the ZooKeeper client state never transitions to the CONNECTED state and keeps waiting for
this to happen.  I see the stack traces below when running the test program.

{noformat}
12/10/09 20:24:15 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:5689
12/10/09 20:24:15 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error,
closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1078)
12/10/09 20:24:15 INFO zookeeper.ClientCnxn: Opening socket connection to server localhost/127.0.0.1:5689
12/10/09 20:24:15 WARN zookeeper.ClientCnxn: Session 0x0 for server null, unexpected error,
closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:567)
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1078)
{noformat}






                
> ZookeeperInstance gets stuck when given bad host
> ------------------------------------------------
>
>                 Key: ACCUMULO-131
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-131
>             Project: Accumulo
>          Issue Type: Bug
>          Components: client
>            Reporter: Keith Turner
>            Assignee: Eric Newton
>             Fix For: 1.4.2
>
>
> Keith Massey reported the following issue on the mailing list.
> {quote}
> A user of our recently filed a bug with us because our code hung forever when she gave
us an address for a zookeeper that was not running. I think I've traced the problem into org.apache.accumulo.core.zookeeper.ZooSession.connect().
If the connection to the zookeeper fails it throws a ConnectException, which gets caught by
the catch (IOException) block, which logs the message and keeps trying infinitely. It's definitely
user error passing in an invalid zookeeper. But shouldn't that method bail out after some
time?
> Thanks.
> Keith
> {quote}

--
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

Mime
View raw message