You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/23 12:54:00 UTC

[jira] [Commented] (KAFKA-7193) ZooKeeper client times out with localhost due to random choice of ipv4/ipv6

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

ASF GitHub Bot commented on KAFKA-7193:
---------------------------------------

rajinisivaram opened a new pull request #5414: KAFKA-7193: Use ZooKeeper IP address in streams tests to avoid timeouts
URL: https://github.com/apache/kafka/pull/5414
 
 
   ZooKeeper client from version 3.4.13 doesn't handle connections to `localhost` very well. If ZooKeeper is started on 127.0.0.1 on a machine that has both ipv4 and ipv6 and a client is created using `localhost` rather than the IP address in the connection string, ZooKeeper client attempts to connect to ipv4 or ipv6 randomly with a fixed one second backoff if connection fails. Use `127.0.0.1` instead of `localhost` in streams tests to avoid intermittent test failures due to ZK client connection timeouts if ipv6 is chosen in consecutive address selections.
   
   ### Committer Checklist (excluded from commit message)
   - [ ] Verify design and implementation 
   - [ ] Verify test coverage and CI build status
   - [ ] Verify documentation (including upgrade notes)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> ZooKeeper client times out with localhost due to random choice of ipv4/ipv6
> ---------------------------------------------------------------------------
>
>                 Key: KAFKA-7193
>                 URL: https://issues.apache.org/jira/browse/KAFKA-7193
>             Project: Kafka
>          Issue Type: Bug
>          Components: zkclient
>    Affects Versions: 2.0.0
>            Reporter: Rajini Sivaram
>            Assignee: Rajini Sivaram
>            Priority: Major
>
> ZooKeeper client from version 3.4.13 doesn't handle connections to `localhost` very well. If ZooKeeper is started on 127.0.0.1 on a machine that has both ipv4 and ipv6 and a client is created using `localhost` rather than the IP address in the connection string, ZooKeeper client attempts to connect to ipv4 or ipv6 randomly with a fixed one second backoff if connection fails. With the default 6 second connection timeout in Kafka, this can result in client connection failures if ipv6 is chosen in consecutive address selections.
> Streams tests are failing intermittently as a result of this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)