Skip to content

KAFKA-7193: Use ZooKeeper IP address in streams tests to avoid timeouts#5414

Merged
rajinisivaram merged 2 commits intoapache:trunkfrom
rajinisivaram:KAFKA-7193-streams-test
Jul 23, 2018
Merged

KAFKA-7193: Use ZooKeeper IP address in streams tests to avoid timeouts#5414
rajinisivaram merged 2 commits intoapache:trunkfrom
rajinisivaram:KAFKA-7193-streams-test

Conversation

@rajinisivaram
Copy link
Copy Markdown
Contributor

@rajinisivaram rajinisivaram commented Jul 23, 2018

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. Also add note to upgrade docs for 2.0.0.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@rajinisivaram rajinisivaram requested a review from mjsax July 23, 2018 12:53
@rajinisivaram rajinisivaram requested a review from ijuma July 23, 2018 13:40
Copy link
Copy Markdown
Member

@ijuma ijuma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for diagnosing this, LGTM.

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

@ijuma Thanks for the review, will merge after builds complete.

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

retest this please

@rajinisivaram
Copy link
Copy Markdown
Contributor Author

Test failures look unrelated, so merging to trunk and 2.0.

@rajinisivaram rajinisivaram merged commit 4b60ed3 into apache:trunk Jul 23, 2018
rajinisivaram added a commit that referenced this pull request Jul 23, 2018
…ts (#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. Also add note to upgrade docs for 2.0.0.

Reviewers: Ismael Juma <github@juma.me.uk>, Matthias J. Sax <matthias@confluent.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants