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

Getting an error in zookeeper #734

Open
Y07yoyo opened this issue Feb 21, 2023 · 2 comments
Open

Getting an error in zookeeper #734

Y07yoyo opened this issue Feb 21, 2023 · 2 comments

Comments

@Y07yoyo
Copy link

Y07yoyo commented Feb 21, 2023

Hi,

I am suddenly getting this error on my zookeeper logs:

image
This is my docker-compose file:

version: '3.2'
services:
  zookeeper:
    image: wurstmeister/zookeeper
    ports:
      - "2181:2181"
    restart: "always"
  kafka:
    image: wurstmeister/kafka:latest
    depends_on:
      - zookeeper
    ports:
      - target: 9094
        published: 9094
        protocol: tcp
        mode: host
    restart: "always"
    environment:
      HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
      KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
      KAFKA_ADVERTISED_LISTENERS: INSIDE://:9092,OUTSIDE://_{HOSTNAME_COMMAND}:9094
      KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9094
      KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
      KAFKA_LOG_RETENTION_MS: 3600000
      KAFKA_LOG_RETENTION_HOURS: 1
      KAFKA_LOG_RETENTION_CHECK_INTERVAL_MS: 1800000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
  viewer:
    image: 'obsidiandynamics/kafdrop'
    ports:
      - '9000:9000'
    restart: "always"
    environment:
      - KAFKA_BROKERCONNECT=kafka:9092
      - JVM_OPTS=-Xms16M -Xmx48M -Xss180K -XX:-TieredCompilation -XX:+UseStringDeduplication -noverify
    depends_on:
      - kafka
@ChenZhongPu
Copy link

The issue is also found in my computer. I suggest bitnami/zookeeper because it is well maintained.

@opencmit2
Copy link

opencmit2 commented Mar 2, 2023

Please use the compose file I provided. I have been using this file,The image wurstmeister has been customized. You'd better use the same image of wurstmeister
Note:

version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper
#image: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
privileged: true

kafka1:
image: wurstmeister/kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.0.212
KAFKA_CREATE_TOPICS: TestComposeTopic:4:3
KAFKA_ZOOKEEPER_CONNECT: 192.168.0.212:2181
KAFKA_BROKER_ID: 1
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.0.212:9092
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092
container_name: kafka01
volumes:
- /var/run/docker.sock:/var/run/docker.sock
privileged: true

kafka2:
image: wurstmeister/kafka
ports:
- "9093:9093"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.0.212
KAFKA_ZOOKEEPER_CONNECT: 192.168.0.212:2181
KAFKA_BROKER_ID: 2
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.0.212:9093
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9093
container_name: kafka02
volumes:
- /var/run/docker.sock:/var/run/docker.sock
privileged: true

kafka3:
image: wurstmeister/kafka
ports:
- "9094:9094"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.0.212
KAFKA_ZOOKEEPER_CONNECT: 192.168.0.212:2181
KAFKA_BROKER_ID: 3
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://192.168.0.212:9094
KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9094
container_name: kafka03
volumes:
- /var/run/docker.sock:/var/run/docker.sock
privileged: true

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

No branches or pull requests

3 participants