Comments (6)
I am having the same issue, when I tried to solve it defining KAFKA_ADVERTISED_HOST_NAME
and KAFKA_ADVERTISED_PORT
in docker-compose.yml
it (apparently) worked, but now I am having the problems described in http://stackoverflow.com/questions/35861501/kafka-in-docker-not-working
By the way I am using ubuntu
from kafka-docker.
You are welcome to try the proposed solution
from kafka-docker.
@asnir What is the proposed solution if i want to have more than one kafka running?
or if I use docker-compose scale
?
from kafka-docker.
Hi,
@nanounanue in your SO post your compose file is not correct as far as i can tell:
zookeeper:
image: wurstmeister/zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
# hostname: kafka
ports:
- "9092"
links:
- zookeeper:zk
environment:
KAFKA_ADVERTISED_HOST_NAME: "kafka"
KAFKA_ADVERTISED_PORT: "9092"
KAFKA_ZOOKEEPER_CONNECT: "zk:2181"
i.e. the port you get is 0.0.0.0:32768->9092/tcp
but you set your advertised port to 9092.
the way the advertised port configuration works is that we either:
- take it from the docker environment if it is not specified and the docker socket is mounted (i.e. we can execute docker inside docker [n.b. the stack trace in this issue usually indicates that docker in docker can't be run]) - see https://github.com/wurstmeister/kafka-docker/blob/master/start-kafka.sh#L7
- or we take the value specified in the compose file.
in your example you can see that your port is 0.0.0.0:32768->9092/tcp
, so setting the advertised port to 9092 won't work.
to fix it, either fix the port i.e.
ports:
- "9092:9092"
or remove the KAFKA_ADVERTISED_PORT
configuration and add the mounting of the docker socket as in https://github.com/wurstmeister/kafka-docker/blob/master/docker-compose-single-broker.yml
in fact, if you simply change KAFKA_ADVERTISED_HOST_NAME
in https://github.com/wurstmeister/kafka-docker/blob/master/docker-compose-single-broker.yml
to your ubuntu host IP things should work.
Let me know if this helps.
from kafka-docker.
after the above step the port is accessible outside of the container
if we set the port then
"docker-compose scale kafka=2" is not working. it fails with below error.
Cannot start service kafka: driver failed programming external connectivity on endpoint
How to resolve this?
from kafka-docker.
My issue was with the Kafka service, After deleting the pod I forgot to remove the service from the 'kubectl get services --namespace pod_ns'. Once the service removed everything works well.
from kafka-docker.
Related Issues (20)
- Deprecation of "openjdk:11-jre-slim" HOT 2
- $
- Kafka-connect HOT 3
- Log4J Vulnerability HOT 1
- Kafka container restart every day at 00.02
- how to change kafka log path HOT 3
- javax.net.ssl.SSLHandshakeException : Kafka Composer
- New docker images HOT 1
- Getting an error in zookeeper HOT 2
- problem:Tried to send a message to a replica that is not the leader,Your metadata is out of date
- How to enable JMX feature in docker-compose.yml and test it HOT 1
- Error failed to change state for partition HOT 1
- Problem with sending messages from local host to kafka broker in container
- Question: I have over 400 topics that created in three kafka brokers, and now only one of them running HOT 1
- [Maintainability] is this repository still maintained? HOT 1
- Why delete the docker image wurstmeister/kafka? HOT 2
- The container for Kafka and zookeeper seems to be deleted from docker hub HOT 5
- How to build and obtain specific version kafka docker images HOT 1
- Failed to acquire lock on file .lock in /kafka/kafka-data.
- [KafkaServer id=2] Fatal error during KafkaServer shutdown. (kafka.server.KafkaServer)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka-docker.