Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker compose is flaky with Cadence using Kafka, probably just upgrade Cadence #458

Closed
longquanzheng opened this issue Oct 18, 2024 · 6 comments · Fixed by #528
Closed

Comments

@longquanzheng
Copy link
Contributor

longquanzheng commented Oct 18, 2024

by @lwolczynski : seems like the Kafka is sometimes not ready on the first time, and it will work on 2nd run.

Our Cadence dependencies are too old, maybe just upgrade it

@longquanzheng longquanzheng changed the title Docker compose is flaky with Cadence using Kafka Docker compose is flaky with Cadence using Kafka, probably just upgrade Cadence Nov 27, 2024
@longquanzheng
Copy link
Contributor Author

The issue is that Kafka is depends on Zookeeper, Cadence depends on Kafka.
Sometimes Kafka is started earlier than zookeeper then run into problems

@longquanzheng
Copy link
Contributor Author

ChatGPT told us this solution:

version: '3.9'

services:
  zookeeper:
    image: wurstmeister/zookeeper:latest
    ports:
      - "2181:2181"

  kafka:
    image: wurstmeister/kafka:2.12-2.1.1
    ports:
      - "9092:9092"
    environment:
      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092
      KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
    depends_on:
      - zookeeper
    healthcheck:
      test: ["CMD", "sh", "-c", "echo > /dev/tcp/localhost/9092"]
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s

@lwolczynski
Copy link
Contributor

Did you test it? I can give it a shot

@longquanzheng
Copy link
Contributor Author

Did you test it? I can give it a shot

Yeah just did this with @bowersj27 and seems working: #527

@longquanzheng
Copy link
Contributor Author

@lwolczynski @bowersj27 oh shoot. The issue was not Cadence->Kafka, it was Kafka->ZooKeeper ...ahhh

@longquanzheng
Copy link
Contributor Author

longquanzheng commented Dec 20, 2024

@lwolczynski @bowersj27 oh shoot. The issue was not Cadence->Kafka, it was Kafka->ZooKeeper ...ahhh

okay, I followed the issue to add healtcheck to zookeeper

wurstmeister/kafka-docker#167

@lwolczynski lwolczynski linked a pull request Dec 20, 2024 that will close this issue
5 tasks
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 a pull request may close this issue.

2 participants