Reputation: 1610
i am trying to implement apache kafka on docker based on this article https://medium.com/simform-engineering/set-up-kafka-ecosystem-on-local-machine-1a00a436c0ba.
I have altered the yml compose file so the port the have described i correctly bounded
.YML COMPOSE FILE
version: '3'
services:
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
kafka:
image: wurstmeister/kafka
container_name: kafka
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_HOST_NAME: 192.168.0.1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
kafka_manager:
image: kafkamanager/kafka-manager
container_name: kafka-manager
restart: always
ports:
- "9000:9000"
environment:
ZK_HOSTS: "zookeeper:2181"
APPLICATION_SECRET: "random-secret"
When i started the containers i can't create an cluster because i get this error: KeeperErrorCode = Unimplemented for /kafka-manager/mutex. I managed to fix this error with this article KeeperErrorCode = Unimplemented for /kafka-manager/mutex
Now i see the cluster in my cluster
But when i press on MyFirstCluster(see picture above). I get the following error
Yikes! Ask timed out on [ActorSelection[Anchor(akka://kafka-manager-system/), Path(/user/kafka-manager/MyFirstCluster/kafka-state)]] after [2000 ms]. Message of type [kafka.manager.model.ActorModel$KSGetBrokers$] was sent by [Actor[akka://kafka-manager-system/user/kafka-manager/MyFirstCluster#-549568985]]. A typical reason for `AskTimeoutException` is that the recipient actor didn't send a reply.
This is what i have tried:
Can you please help me with this error.
Upvotes: -1
Views: 169
Reputation: 1
This issue is likely occurring because you're using localhost:2181 for your Zookeeper hosts. When containers are trying to communicate within a Docker cluster, you should use the service name instead of localhost. This allows the containers to resolve the correct network address within the cluster.
Upvotes: 0