I am installing from https://github.com/conduktor/kafka-stack-docker-compose/blob/master/zk-multiple-kafka-multiple.yml unsuccessfully.
These are my docker conatiners:
f158c8d436fb confluentinc/cp-kafka:7.1.1 "/etc/confluent/dock…" 22 minutes ago Up 13 minutes 9092/tcp, 0.0.0.0:9093->9093/tcp, :::9093->9093/tcp kafka2
9bce7c4ec4d3 confluentinc/cp-kafka:7.1.1 "/etc/confluent/dock…" 22 minutes ago Up 13 minutes 0.0.0.0:9092->9092/tcp, :::9092->9092/tcp kafka1
b92a723835ea confluentinc/cp-kafka:7.1.1 "/etc/confluent/dock…" 22 minutes ago Up 13 minutes 9092/tcp, 0.0.0.0:9094->9094/tcp, :::9094->9094/tcp kafka3
0e483aa953a3 confluentinc/cp-zookeeper:7.1.1 "/etc/confluent/dock…" 22 minutes ago Up 13 minutes 2181/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2182->2182/tcp, :::2182->2182/tcp zoo2
2fb1b2b8e799 confluentinc/cp-zookeeper:7.1.1 "/etc/confluent/dock…" 22 minutes ago Up 13 minutes 2181/tcp, 2888/tcp, 3888/tcp, 0.0.0.0:2183->2183/tcp, :::2183->2183/tcp zoo3
1ffc65f8120f confluentinc/cp-zookeeper:7.1.1 "/etc/confluent/dock…" 22 minutes ago Up 13 minutes 2888/tcp, 0.0.0.0:2181->2181/tcp, :::2181->2181/tcp, 3888/tcp zoo1
when I try to execute some command inside the kafka1 container: kafka-console-producer --broker-list kafka1:9092 --topic first_topic I am getting:
[2022-06-26 03:03:36,048] WARN [Consumer clientId=console-consumer, groupId=console-consumer-81981] Connection to node 2147483644 (/127.0.0.1:9094) could not be established. Broker may not be available. (org.apache.kafka.clients.NetworkClient)
if I use localhost in place of kafka1 I get the same error.
Sometimes I can send the message but when I try to consume it I get the same error.
Sometimes the brokers stop without to show any error in the log container.
Thank you.