lensesio / fast-data-dev

Kafka Docker for development. Kafka, Zookeeper, Schema Registry, Kafka-Connect, Landoop Tools, 20+ connectors
https://lenses.io
Apache License 2.0
2.01k stars 330 forks source link

Works here but delay a lot, repeating the log "Broker may not be available." #191

Open lucaslgr opened 1 year ago

lucaslgr commented 1 year ago

PS: I realise that for the same project, the issue below just happens in MAC M1 environments, for Linux doesn't.

I have these settings in my docker-composer:

  kafka:
    image: dougdonohoe/fast-data-dev:latest
    container_name: local_kafka
    ports:
      - '2181:2181'
      - '9092:9092'
      - '8083:8081'
      - '3030:3030'
    environment:
      ADV_HOST: localhost

And when I run the docker compose up and after run a .sh script to create topics as below:

docker-compose -f local/docker-compose.yaml exec kafka kafka-topics --create --if-not-exists --bootstrap-server localhost:9092 --replication-factor 1 --partitions 2 --topic area.product-created

The script repeats almost 40 times the log below until this really can create the topic:

WARN [AdminClient clientId=adminclient-1] Connection to node -1 (localhost/127.0.0.1:9092) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)