-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
[bitnami/kafka] Cannot create directory '/bitnami/kafka/config': Permission denied #41422
Comments
Related #41393 (comment) |
Hi, It seems that the permissions of the volume are not enough for the non-root container. How did you create the volume? Is it a bind-mount? |
No, it's not a bind mount, it's a named volume volumes:
kafka-data: I think you are referring to Bind mount From Bitnami's containers/bitnami/kafka/README.md |
I've been able to use named volumes perfectly fine I suggest not using latest tags, though, since issues with those images aren't repeatable as new commits are made to the repo |
This issue is resolved after using specific tag i.e., |
Hi @sairaghavak, We have released a new major version of the |
I'm having the same problem with this. |
Hi @wxywizard, Could you please share the docker-compose you used in your deployment? |
sure, something like this kafka-broker:
container_name: kafka-broker
<<: *kafka-common
volumes:
- "/etc/localtime:/etc/localtime"
- "./cluster-data/kafka-broker:/bitnami/kafka"
environment:
<<: *kafka-common-env
KAFKA_CFG_NODE_ID: 4
KAFKA_CFG_BROKER_ID: 4
KAFKA_CFG_PROCESS_ROLES: broker
KAFKA_CFG_LISTENERS: BROKER://:9095 # kafka监听地址
KAFKA_CFG_ADVERTISED_LISTENERS: BROKER://host.docker.internal:9095
ports:
- "9095:9095"
networks:
kafka:
ipv4_address: 172.22.6.33 |
The host user I use is root |
Hi @wxywizard, I think in this case the issue is not related to the container but the permissions of the mounted volume. Ownership and permissions of |
This folder is a new directory I created with the mkdir command under root user, do I need to give any more permissions? |
There are several factors that could cause a container not to have write permission over a mounted directory. In your case I would like to suggest to not create the volume manually and instead let the |
I resolved the issue for this directory by using the command |
Yes, if the directory from your host is mapped to the container using a volume, the owner of that directory should be the UID 1001 |
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. |
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary. |
@carrodher , did this change/evolve at some point? I had to reinstall a node and am now getting it refusing to create the directory, where I had no issues when installing initially. I am using the bitnami helm chart, and installing using a local volume in k3s, if that makes a difference. |
There were several changes lately in the Kafka container image and Helm chart, please, create a new issue describing your specific use case |
Actually I think it may be k3s specific. The local volume directory didn't have g/u write permissions, and adding them allowed kube to create the necessary directory. Thanks. |
I did this and it still didn't solve the problem, what could be the possible reason? |
when I tried to put output from 3 brokers in one directiry on HD, I had the same exception |
Name and Version
bitnami/kafka:latest
What architecture are you using?
amd64
What steps will reproduce the bug?
I am using
docker-compose.yml
to spin up a kafka contiainer based on bitnami's kafka image without zookeeperHere is the specific service excerpt from docker-compose
The docker contianer keeps restarting and when I checked the container logs it says
Does the user inside the container has admin permissions, not sure, any pointers would help.
What is the expected behavior?
Container should be running smoothly
What do you see instead?
Additional information
Looks like the user in the container doesn't have permission
The text was updated successfully, but these errors were encountered: