Comments (7)
Running kafkacat
to list the broker meta, I get:
Metadata for all topics (from broker -1: localhost:20031/bootstrap):
3 brokers:
broker 2 at kafka2:9093
broker 1 at kafka1:9092
broker 3 at kafka3:9094
Which should have been 10.0.1.9:20031
and so on. If I use the same host and container port, then the IP is displayed correctly, and everything works.
Is it possible to change the host ports without breaking things? π
from kafka-stack-docker-compose.
yes. Updated README
Q: Can I change the zookeeper ports?
A: yes. Say you want to change zoo1
port to 12181
(only relevant lines are shown):
zoo1:
ports:
- "12181:12181"
environment:
ZOO_PORT: 12181
kafka1:
environment:
KAFKA_ZOOKEEPER_CONNECT: "zoo1:12181"
Q: Can I change the Kafka ports?
A: yes. Say you want to change kafka1
port to 12345
(only relevant lines are shown). Note only LISTENER_DOCKER_EXTERNAL
changes:
kafka1:
image: confluentinc/cp-kafka:5.0.0
hostname: kafka1
ports:
- "12345:12345"
environment:
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka1:19092,LISTENER_DOCKER_EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:12345
from kafka-stack-docker-compose.
Thanks!
Curious, why does host and container port have to be the same?
from kafka-stack-docker-compose.
Have a look through the blog at the top of the readme
from kafka-stack-docker-compose.
I read the entire thing π I still don't understand why the ports need to be the same in order for it to advertise the correct host and port when connecting externally?
from kafka-stack-docker-compose.
- client connects to Kafka on port A
- Kafka responds and says btw I run on port B and you should use B
- client tries to connect to Kafka on port B
If A!=B then things will be problematic
This is due to how Kafka implements broker discovery. Each broker knows best how to be connected to it and clients have to use what brokers advertise
from kafka-stack-docker-compose.
I can't find any documentation regarding all listeners requiring the use of the same port though? Do you think it's a Kafka bug?
from kafka-stack-docker-compose.
Related Issues (20)
- Not able to connect from remote computer. HOT 1
- Conductor credentials don't work for me HOT 1
- conduktor-platform container sends admin email address to company HOT 2
- Docker compose version is too old: 2.1 HOT 1
- Unauthorized Schema Registry HOT 1
- wth is this? HOT 1
- Access issue to explore your Kafka data HOT 1
- Support to run the docker-compose of Kafka in Windows 10/11 HOT 1
- Set properties in files like server.properties and producer.properties HOT 1
- Error configuring rabbitmq-kafka connector HOT 1
- Introspection is disabled
- Support for kafkaiui HOT 3
- conduktor-console container does not automatically configure Kafka Connector when KAFKACONNECTS environment variables are provided HOT 6
- conduktor.yml - container name to conduktor-console HOT 2
- I am getting an error (failed to solve: process)
- Error initializing kafka store while initializing schema registry
- No volumes?
- Kafka cannot connect to zookeeper
- FATAL: database "conduktor-console" does not exist HOT 1
- Automatically create a ngrok internet accessable kafka broker HOT 1
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-stack-docker-compose.