-
Notifications
You must be signed in to change notification settings - Fork 682
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with running kafka (without zookeeper) #80
Comments
Same here! I'm trying to connect with kafka-topics: $ kafka-topics --bootstrap-server localhost:9092 --list |
Same Issue here tested with the v7.0.0 container |
@bjrke Can you please clarify what you mean by "the console consume"? |
the consoleConsumer provided with kafka itself, sorry for the typo, I will edit my comment |
Does this fix help? |
@mbreevoort Not for me. Made no difference, unfortunately. |
Facing the same issue that I first discovered using librdkafka, but the same happens with a Java producer, too. From the broker container:
Whereas if running the standard image with zookeeper I'm getting this result:
What gets my attention is:
vs.
I'm guessing that could be part of the problem (I remember having troubles when running HTTP server in docker for instance, and having to use So I tried and changed my config to: broker:
image: confluentinc/cp-kafka:7.0.1
hostname: broker
container_name: broker
ports:
- "9092:9092"
- "9101:9101"
environment:
KAFKA_BROKER_ID: 1
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: 'CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT'
KAFKA_ADVERTISED_LISTENERS: 'PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092'
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
KAFKA_PROCESS_ROLES: 'broker,controller'
KAFKA_NODE_ID: 1
KAFKA_CONTROLLER_QUORUM_VOTERS: '1@broker:29093'
KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092'
KAFKA_INTER_BROKER_LISTENER_NAME: 'PLAINTEXT'
KAFKA_CONTROLLER_LISTENER_NAMES: 'CONTROLLER'
KAFKA_LOG_DIRS: '/tmp/kraft-combined-logs'
KAFKA_LOG4J_LOGGERS: "kafka.controller=TRACE,kafka.server=TRACE,kafka.broker=TRACE,kafka.server.IncrementalFetchContext=WARN"
volumes:
- ./update_run.sh:/tmp/update_run.sh
command: "bash -c 'if [ ! -f /tmp/update_run.sh ]; then echo \"ERROR: Did you forget the update_run.sh file that came with this docker-compose.yml file?\" && exit 1 ; else /tmp/update_run.sh && /etc/confluent/docker/run ; fi'" the change being: KAFKA_LISTENERS: 'PLAINTEXT://broker:29092,CONTROLLER://broker:29093,PLAINTEXT_HOST://0.0.0.0:9092' And it looks ok so far, need to experiment more and make sure everything is still working both from the inside of docker compose and from the outside.
Hopefully this helps. Can file a PR if this is indeed the appropriate solution. |
@aesteve thank you for tracking down the issue. I have verified in my environment that |
Description
Error connecting to broker when running kraft
cp-all-in-one/cp-all-in-one-kraft
https://github.com/confluentinc/cp-all-in-one/tree/6.2.0-post/cp-all-in-one-kraft
Troubleshooting
When i run the sample producer i get an exception:
2021-09-22 12:39:35 WARN NetworkClient:1060 - [Producer clientId=producer-1] Bootstrap broker localhost:9092 (id: -1 rack: null) disconnected
I checked the logs and the broker seems up but can't connect to it
The other examples work fine with zookeeper but not this one.
Environment
6.2.0-post
The text was updated successfully, but these errors were encountered: