You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@accumulo.apache.org by Keith Massey <ke...@digitalreasoning.com> on 2011/11/09 16:13:52 UTC

ZooSession infinite loop

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

Re: ZooSession infinite loop

Posted by Keith Turner <ke...@deenlo.com>.
On Wed, Nov 9, 2011 at 10:13 AM, Keith Massey
<ke...@digitalreasoning.com> wrote:
> 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
>

Yeah, in this case it should not retry forever. I opened a ticket.

https://issues.apache.org/jira/browse/ACCUMULO-131

Re: ZooSession infinite loop

Posted by John W Vines <jo...@ugov.gov>.

----- Original Message -----
| From: "Keith Massey" <ke...@digitalreasoning.com>
| To: accumulo-user@incubator.apache.org
| Sent: Wednesday, November 9, 2011 10:13:52 AM
| Subject: ZooSession infinite loop
| 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

I agree that it should fail elegantly. Do you want me to create a ticket for it or can you?

John