[
https://issues.apache.org/jira/browse/CURATOR-229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14611829#comment-14611829
]
Michael Putters commented on CURATOR-229:
-----------------------------------------
The stacktrace:
{code}
ERROR o.a.c.f.imps.CuratorFrameworkImpl - Background exception was not
retry-able or retry gave up
java.net.UnknownHostException: host.name.here
at java.net.InetAddress.getAllByName0(InetAddress.java:1250) ~[na:1.7.0_67]
at java.net.InetAddress.getAllByName(InetAddress.java:1162) ~[na:1.7.0_67]
at java.net.InetAddress.getAllByName(InetAddress.java:1098) ~[na:1.7.0_67]
at
org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:61)
~[zookeeper-3.4.6.jar:3.4.6-1569965]
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:445)
~[zookeeper-3.4.6.jar:3.4.6-1569965]
at
org.apache.curator.utils.DefaultZookeeperFactory.newZooKeeper(DefaultZookeeperFactory.java:29)
~[curator-client-2.7.0.jar:na]
at
org.apache.curator.framework.imps.CuratorFrameworkImpl$2.newZooKeeper(CuratorFrameworkImpl.java:160)
~[curator-framework-2.7.0.jar:na]
at org.apache.curator.HandleHolder$1.getZooKeeper(HandleHolder.java:94)
~[curator-client-2.7.0.jar:na]
at org.apache.curator.HandleHolder.getZooKeeper(HandleHolder.java:55)
~[curator-client-2.7.0.jar:na]
at org.apache.curator.ConnectionState.reset(ConnectionState.java:218)
~[curator-client-2.7.0.jar:na]
at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:193)
~[curator-client-2.7.0.jar:na]
at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:87)
~[curator-client-2.7.0.jar:na]
at
org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115)
~[curator-client-2.7.0.jar:na]
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.performBackgroundOperation(CuratorFrameworkImpl.java:816)
[curator-framework-2.7.0.jar:na]
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.backgroundOperationsLoop(CuratorFrameworkImpl.java:802)
[curator-framework-2.7.0.jar:na]
at
org.apache.curator.framework.imps.CuratorFrameworkImpl.access$400(CuratorFrameworkImpl.java:61)
[curator-framework-2.7.0.jar:na]
at
org.apache.curator.framework.imps.CuratorFrameworkImpl$4.call(CuratorFrameworkImpl.java:272)
[curator-framework-2.7.0.jar:na]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_67]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_67]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_67]
at java.lang.Thread.run(Thread.java:745) [na:1.7.0_67]
{code}
> No retry on DNS lookup failure
> ------------------------------
>
> Key: CURATOR-229
> URL: https://issues.apache.org/jira/browse/CURATOR-229
> Project: Apache Curator
> Issue Type: Bug
> Components: Framework
> Affects Versions: 2.7.0
> Reporter: Michael Putters
>
> Our environment is setup so that host names (rather than IP addresses) are
> used when registering services.
> When disconnecting a node from the network, it will attempt to reconnect and
> - in order to do this - attempts to resolve a host name, which fails (since
> we have no network connectivity and a DNS server is used).
> It appears this type of exception is no retryable, and the node simply gives
> up and never reconnects, even when the network connectivity is back.
> Is this the expected behavior? Is there any way to configure Curator so that
> this type of exception is retryable? I had a look at
> {{CuratorFrameworkImpl.java}} around line 768 but there doesn't seem to be
> anything configurable.
> If this is not the expected behavior (or if it is but you don't mind making
> it configurable), I should be able to provide a patch via a pull request.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)