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

Jun Rao commented on KAFKA-5473:
--------------------------------

One thing to note is that the construction of the ZooKeeper object can throw an 
exception.

org.I0Itec.zkclient.exception.ZkException: Unable to connect to 
zookeeper.host.xxx.xxx:2181
at org.I0Itec.zkclient.ZkConnection.connect(ZkConnection.java:72)
at org.I0Itec.zkclient.ZkClient.reconnect(ZkClient.java:1289)
at org.I0Itec.zkclient.ZkClient.processStateChanged(ZkClient.java:721)
at org.I0Itec.zkclient.ZkClient.process(ZkClient.java:632)
at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:530)
at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:505)
Caused by: java.net.UnknownHostException: zookeeper.host.xxx.xxx
at java.net.InetAddress.getAllByName0(InetAddress.java:1280)
at java.net.InetAddress.getAllByName(InetAddress.java:1192)
at java.net.InetAddress.getAllByName(InetAddress.java:1126)
at 
org.apache.zookeeper.client.StaticHostProvider.<init>(StaticHostProvider.java:61)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:445)
at org.apache.zookeeper.ZooKeeper.<init>(ZooKeeper.java:380)
at org.I0Itec.zkclient.ZkConnection.connect(ZkConnection.java:70)

> handle ZK session expiration properly when a new session can't be established
> -----------------------------------------------------------------------------
>
>                 Key: KAFKA-5473
>                 URL: https://issues.apache.org/jira/browse/KAFKA-5473
>             Project: Kafka
>          Issue Type: Sub-task
>    Affects Versions: 0.9.0.0
>            Reporter: Jun Rao
>
> In https://issues.apache.org/jira/browse/KAFKA-2405, we change the logic in 
> handling ZK session expiration a bit. If a new ZK session can't be 
> established after session expiration, we just log an error and continue. 
> However, this can leave the broker in a bad state since it's up, but not 
> registered from the controller's perspective. Replicas on this broker may 
> never to be in sync.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to