-
Notifications
You must be signed in to change notification settings - Fork 240
Elasticsearch won't start when path.data
or path.logs
env var are defined
#167
Comments
That's nasty, thanks for the report. It will be interesting to fix completely too, since environment variables are only one way to set those values. If the user sets them that way, the startup script can see it easily and act accordingly. If, however, they set |
So, in practice, is there any need to mount the data dir to somewhere other than Can you help me understand the scenario where a user would need to mount it elsewhere? |
@LudovicTOURMAN one thing to note is that at least in your reproduction example you are assuming the directories exist in the container, but you don't seem to be using a bind mount or a volume. If instead you create the dirs locally and ensure they have GID 0 access (item 1 in notes), things start working again:
You are correct that the |
Personnaly I use the
|
@LudovicTOURMAN did you develop a workaround? I'm trying to change a static configuration setting ( |
This issue seemed to be split into several related threads. As noted before, bind mounts should be used for paths. Regarding kubernetes, helm charts have been added for elasticsearch, as well as work on [kubernetes https://www.elastic.co/blog/introducing-elastic-cloud-on-kubernetes-the-elasticsearch-operator-and-beyond). Maintenance of the docker files for elasticsearch has moved to the elasticsearch repo. Please open any futher issues there. As we will be archiving this repository, I am going to close this issue. |
Bug Description
When defining a custom data/logs path through environment variables (As described here), elasticsearch failed to start as it try to write as elasticsearch [1000] user in a folder owned by root [0] user.
Using default Dockerfile configuration, the entrypoint allow to
chown
data/logs folders through theTAKE_FILE_OWNERSHIP
env var.This block part should be changed to also chown paths defined through env vars
path.data
andpath.logs
.Bug Information
docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
docker info
output :docker inspect NAME|ID
output :docker run -it --rm --name es -e "discovery.type=single-node" -e "path.data=/home/data" -e "path.logs=/home/logs" docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.4
The text was updated successfully, but these errors were encountered: