-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Can't connect to Kafka on Apple Silicon #647
Comments
I am facing the same issue on M1 mac |
wurstmeister/kafka currently does not provide arm builds and it is likely that the qemu emulation layer is failing (many users encountering segfaults in various amd64 images docker/for-mac#5123) The openjdk base image does provide arm builds so I've simply built my own image locally from this repo like so (additionally using the official zookeeper image with arm builds):
|
@jdamiani27 |
I was able to get it working by building my own image locally from this repo and using it to pull up kafka on my M1 MAC |
For now you can use https://hub.docker.com/r/niks123123/kafka |
Clone wurstmeister/kafka-docker project to your local and build the image. Then use this image, works fine. |
Changing the image from openjdk to azul/zulu-openjdk-alpine:8u292-8.54.0.21. @wurstmeister would you be interested in bumping the base image to a newer one? cc @huang-x-h (not sure who to ping here) PR raised, it's working for me, a few other people have also 👍 'd it |
The previous image was crashing on M1. After trying a few different images, this one seems to solve the problem Closes wurstmeister#647
The previous image was crashing on M1. After trying a few different images, this one seems to solve the problem Closes wurstmeister#647
@wurstmeister is this something you'd be interested in merging? |
The previous image was crashing on M1. After trying a few different images, this one seems to solve the problem Closes wurstmeister#647
The previous image was crashing on M1. After trying a few different images, this one seems to solve the problem Closes #647
For those looking to get something working across both M1 and Intel for Confluent Kafka, we have had success with the following: ---
version: '2'
services:
zookeeper:
image: antrea/confluentinc-zookeeper:6.2.0
hostname: zookeeper
container_name: zookeeper
ports:
- '2181:2181'
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
broker:
image: antrea/confluentinc-kafka:6.2.0
hostname: broker
container_name: broker
depends_on:
- zookeeper
ports:
- '9092:9092'
- '9101:9101'
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:29092,PLAINTEXT_HOST://localhost:9092
# NOTE: Not supported by current container
# KAFKA_METRIC_REPORTERS: io.confluent.metrics.reporter.ConfluentMetricsReporter
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
KAFKA_CONFLUENT_LICENSE_TOPIC_REPLICATION_FACTOR: 1
KAFKA_CONFLUENT_BALANCER_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_JMX_PORT: 9101
KAFKA_JMX_HOSTNAME: localhost
# TODO: Uncomment once enable schema registry
# KAFKA_CONFLUENT_SCHEMA_REGISTRY_URL: http://schema-registry:8081
CONFLUENT_METRICS_REPORTER_BOOTSTRAP_SERVERS: broker:29092
CONFLUENT_METRICS_REPORTER_TOPIC_REPLICAS: 1
CONFLUENT_METRICS_ENABLE: 'true'
CONFLUENT_SUPPORT_CUSTOMER_ID: 'anonymous' |
Error response from daemon: Get "https://docker.elastic.co/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) |
Hello.
When i am trying to run kafka on apple with silicon m1 chip, i have no errors on logs, but can't connect to kafka container. Tried to use simple docker-compose.yml:
No errors on logs, just telling that
waiting for kafka to be ready
and that's it. Can't connect to localhost:9092Maybe somebody knows where is the problem?
The text was updated successfully, but these errors were encountered: