-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Zookeeper sometimes fails to start accepting connections #5586
Comments
Hi @florian-besser, Could you add version: "3.7"
services:
zookeeper:
container_name: zookeeper
networks:
- mynet
image: bitnami/zookeeper:3.7.1
ports:
- 2181:2181
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
- BITNAMI_DEBUG=true
restart: always
deploy:
resources:
limits:
memory: 256M
kafka:
container_name: kafka
networks:
- mynet
depends_on:
- "zookeeper"
image: bitnami/kafka:2.8.1
ports:
- 9092:9092
environment:
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_BROKER_ID=500
- KAFKA_CFG_BROKER_ID_GENERATION_ENABLE=false
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- KAFKA_LISTENERS=PLAINTEXT://:9092,DOCKER://:29092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092,DOCKER://kafka:29092
- KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,DOCKER:PLAINTEXT
- KAFKA_HEAP_OPTS=-Xmx512m -Xms512m
- BITNAMI_DEBUG=true
restart: always
deploy:
resources:
limits:
memory: 512M
networks:
mynet:
name: mynet |
I have added the variable and will report back once the issue shows itself again. |
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback. |
I have encountered a similar issue again: Zookeeper logs seem normal:
However Kafka is stuck now:
The containers both report healthy and do NOT restart but no connection can be established to Kafka.
A |
Hi @florian-besser, Did you try to increase |
I have set the environment variable; will let you know how things progress. I'm no network expert but I'm a bit puzzled how a local connection from one locally running container to another locally running container can exhibit this behavior. I would expect local connections to either connect or fail immediately, and not to block forever. If the case I've hit can genuinely occur randomly I would suggest setting a large (but finite) default timeout rather than leaving the default timeout "infinite". |
I don't know what could be wrong with your network. If you look for this error, it has happened to other people in different situations. This problem is not related to the bitnami container, the problem is related to the zookeeper and the environment. |
I have encountered the issue once more; here are the requested logs: kafka:
Zookeeper:
However when debugging this time
A I'm running a bog standard Mac Pro (M1) with Docker desktop; there are no special networks configs present. As such I'm not quite happy with a statement that implies my network has somehow issues - running dockerized images on MacOS should be within the scope of all involved pieces. |
There are a lot of issues with M1, docker/for-mac#5736, and confluentinc/kafka-images#80... Did you check these issues? |
Hi, we have created this issue: bitnami/charts#7305, which is pinned in the Bitnami Helm Charts repository, on this way, we can funnel all the conversations in a single place regarding ARM64 support. We will close the rest of the existing issues just to avoid duplications, please visit the issue mentioned above to see any news (when possible) about this topic. |
Hi all, we are more than happy to announce that from now on the Bitnami container catalog is available as multi-arch in Docker Hub 🎉 🎉 This means you don’t need to specify anything when pulling the container images from Docker Hub, Docker (or any other software) will automatically pull the container image matching the host platform from which the pull command was issued. Here you can find more info about this announcement. As usual, please create a new GitHub issue if you would like to report any bug or problem or directly contribute by creating a PR. Here you can find the contributing guidelines. |
Name and Version
bitnami/zookeeper:3.7.1
What steps will reproduce the bug?
Use the following
docker-compose
file:Most of the time both apps come up and work perfectly fine.
Sometimes Zookeeper refuses connections (see below)
What is the expected behavior?
Both apps should come up all the time; or the container should self-detect it is unhealthy and restart until it is healthy.
What do you see instead?
Kafka produces the following log and then ends in a restart spiral:
Please note the
ZooKeeperClientTimeoutException
towards the end of the log.At the same time Zookeeper does not seem to log any errors:
I would like to see some WARN / ERROR lines in ZK.
To debug whether the issue was in Kafka or in ZK I did the following:
So it seems ZK somehow is unable to receive traffic.
Additional information
After a simple
docker restart zookeeper
things start working again.The text was updated successfully, but these errors were encountered: