-
Notifications
You must be signed in to change notification settings - Fork 855
Permissions on elasticsearch.keystore prevent Elasticsearch from starting #430
Comments
Confirmed the issues exists on 6.1.3 also. |
I am running into the same issue with Chef. Were you ever able to get this fixed? I know they set a GUID on |
Is there a current work-around so I can start my elasticsearch manually until this is fixed? |
sudo chown root:elasticsearch <ES_PATH_CONF>/elasticsearch.keystore should work. |
Yes, what is needed here is for |
Confirming that the issue still exists in
|
This entire problem is being caused by an incorrect mixing of static, read-only configuration ( The /etc directory, and its subdirectories, should not need to be writable by non-privileged users. That's what /var and /tmp are for. My contention is that |
I agree with @kzalewski . I am running elasticsearch in kubernetes, providing its configuration via a ConfigMap. ConfigMaps are read-only, meaning that if I mount it as a directory, and point elasticsearch to that directory as the config location, elasticsearch fails to work. This is a very simple deployment method, and I would really expect it to work. At the very least, there should be a method to override the keystore location. But, it should probably be completely decoupled from static config by default. |
Same for me .. I have no idea how I should run elasticsearch with configuration files as kubernetes config maps.. right now it's impossible as the directory needs to be writable for elasticsearch.keystore .. has anybody a working workaround for it? |
It's possible. Just a pain. You need to mount the individual files. You can see an example in the elasticsearch helm chart, in fact: https://github.com/helm/charts/tree/master/incubator/elasticsearch/templates Take a look at configmap.yaml and client-deployment.yaml. The configmap has an elasticsearch.yml defined, and the client-demployment mounts it directly onto the expected elasticsearch.yml in the container's filesystem. |
Ahh thats perfect! Thank you for the hint. That’s okay for me, it worked!
…________________________________
Von: Kyle Larose <[email protected]>
Gesendet: Dienstag, Oktober 9, 2018 8:34 PM
An: elastic/ansible-elasticsearch
Cc: JZinkl; Comment
Betreff: Re: [elastic/ansible-elasticsearch] Permissions on elasticsearch.keystore prevent Elasticsearch from starting (#430)
It's possible. Just a pain. You need to mount the individual files. You can see an example in the elasticsearch helm chart, in fact:
https://github.com/helm/charts/tree/master/incubator/elasticsearch/templates
Take a look at configmap.yaml and client-deployment.yaml.
The configmap has an elasticsearch.yml defined, and the client-demployment mounts it directly onto the expected elasticsearch.yml in the container's filesystem.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#430 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AHLXHqxoBFC14MDdw-M4MD1w8arDlVusks5ujOwugaJpZM4SMv8_>.
|
Related to #560 (comment) |
Hi Julien, I noticed that you closed this issue. I just wanted to mention that we upgraded to ES 7.3.2 today, and the keystore file permission issue is still present. In fact, it's worse, because ES is trying to write a keystore.tmp file in the /etc/elasticsearch.d/ directory, and that directory does not allow write access. (Previously, I had to allow write access to only the file /etc/elasticsearch.d/elasticsearch.keystore as a workaround to this bug.) If this permission issue is fixed, can you tell me in which version it is fixed? |
Hi @kzalewski, |
Thanks for the quick response @jmlrt. I'm not using Ansible to deploy ES. I simply download the Linux tar.gz package and install it that way. I'm guessing others, like me, were brought to this issue when we all had permissions issues with the ES startup, and searched for a solution on Google. This is why I asked which version of ES has the "fix", because I just upgraded from 6.7.2 to 7.3.2, and the permission problems still persist. I continue to maintain that /etc should not need non-root writable permissions, and that the keystore file should be located in a writable volume like /var. |
Well, this repository is only using Ansible to deploy Elasticsearch. We had an issue because this role was changing some default Elasticsearch files permissions and we removed this code to keep default permission when we can. If you still have a problem not related to Ansible role, can you open an issue to https://github.com/elastic/elasticsearch/ or create a topic on https://discuss.elastic.co/c/elasticsearch so it can be fixed in Elasticsearch code? |
|
From 6.2, and perhaps earlier, it appears the
elasticsearch.keystore
file is created even if X-Pack security isn't enabled. This then prevents Elasticsearch from starting upfrom tasks/xpack/elasticsearch-xpack.yml
I'd suggest removing
"security" in es_xpack_features
.I can create a PR to relax the conditional, and without testing back on 6.x versions ignore errors. Though based on this and other issues, it seems we need some more automated tests around X-Pack features in enabled/disabled states. I will try to look into this when I get some time.
The text was updated successfully, but these errors were encountered: