-
Notifications
You must be signed in to change notification settings - Fork 344
AccessDeniedException: /usr/share/elasticsearch/config/scripts #95
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
Comments
The image entrypoint script will do a |
When I do that, I receive the following error: The config directory is not populate (although the data dir is populated) |
As an FYI (and was expected)- when I remove the /opt/elasticsearch/config:/usr/share/elasticsearch/config line, leaving only the data mount, the container starts as expected. |
Ah, the default config is only populated via the $ docker run --rm elasticsearch:2.3 tar -cC /usr/share/elasticsearch/config . | tar -xC /opt/elasticsearch/config |
@tianon does this means the usual config override is not working anymore as expected?
|
@jalberto not sure what you mean by "the usual config override"; can you elaborate a bit more? |
@tianon I mean this: "This image comes with a default set of configuration files for elasticsearch, but if you want to provide your own set of configuration files, you can do so via a volume mounted at /usr/share/elasticsearch/config" Now I am not able to provide my own config file, doesn't matter whats the content, ES just cannot start. |
I can't reproduce: 😢 $ docker pull elasticsearch:2.3
2.3: Pulling from library/elasticsearch
efd26ecc9548: Already exists
a3ed95caeb02: Already exists
d1784d73276e: Already exists
52a884c93bb2: Already exists
070ee56a6f7e: Already exists
f8b8b1302b4f: Already exists
e71221cc9598: Already exists
349c9e35d503: Already exists
c926a5d75666: Already exists
706d6535a2f0: Already exists
04931a364da7: Already exists
e4667ac2171b: Already exists
4893305d167a: Already exists
5885742731a5: Already exists
028e81961660: Already exists
Digest: sha256:9a5b68fda191686d84af7e129d0de6de81df73c8225edf7876248e9f6b9d6d7a
Status: Image is up to date for elasticsearch:2.3
$ mkdir -p config
$ docker run --rm elasticsearch:2.3 tar -cC /usr/share/elasticsearch/config . | tar -xC config
$ docker run -it --rm -v "$PWD/config":/usr/share/elasticsearch/config elasticsearch:2.3
[2016-04-26 21:43:37,513][WARN ][bootstrap ] unable to install syscall filter: seccomp unavailable: your kernel is buggy and you should upgrade
[2016-04-26 21:43:37,719][INFO ][node ] [Scorpio] version[2.3.1], pid[1], build[bd98092/2016-04-04T12:25:05Z]
[2016-04-26 21:43:37,719][INFO ][node ] [Scorpio] initializing ...
[2016-04-26 21:43:38,379][INFO ][plugins ] [Scorpio] modules [reindex, lang-expression, lang-groovy], plugins [], sites []
[2016-04-26 21:43:38,399][INFO ][env ] [Scorpio] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/sdc3)]], net usable_space [337.6gb], net total_space [935.8gb], spins? [possibly], types [ext4]
[2016-04-26 21:43:38,399][INFO ][env ] [Scorpio] heap size [989.8mb], compressed ordinary object pointers [true]
[2016-04-26 21:43:40,308][INFO ][node ] [Scorpio] initialized
[2016-04-26 21:43:40,308][INFO ][node ] [Scorpio] starting ...
[2016-04-26 21:43:40,386][INFO ][transport ] [Scorpio] publish_address {172.18.0.12:9300}, bound_addresses {[::]:9300}
[2016-04-26 21:43:40,392][INFO ][discovery ] [Scorpio] elasticsearch/I0CHQsMKRsOqFWlI-LScng
[2016-04-26 21:43:43,459][INFO ][cluster.service ] [Scorpio] new_master {Scorpio}{I0CHQsMKRsOqFWlI-LScng}{172.18.0.12}{172.18.0.12:9300}, reason: zen-disco-join(elected_as_master, [0] joins received)
[2016-04-26 21:43:43,524][INFO ][http ] [Scorpio] publish_address {172.18.0.12:9200}, bound_addresses {[::]:9200}
[2016-04-26 21:43:43,524][INFO ][node ] [Scorpio] started
[2016-04-26 21:43:43,565][INFO ][gateway ] [Scorpio] recovered [0] indices into cluster_state |
This looks to be docker-library/docs#378. |
@jalberto is this still an open issue? |
@mi-hol didn't tesnt in 5.x but the documentatoin don't mention that tar extra step |
We found that if a local config directory is being used to configure ES, then it should contain the "scripts" directory and not just the configuration files. It doesn't matter if the "scripts" directory is empty, but it must be present.
If the scripts directory is not there, ES will try and create it and it will fail with the AccessDenied Exception. Once the scripts directory is added to your local config directory, the following command should work without the infamous AccessDenied Exception
|
This image is officially deprecated in favor of upstream's images (see https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html). For more information, please see #160, docker-library/docs#842, and docker-library/docs#945.
Thanks! |
* Contexts for 8.0.0-rc1 This commit was created by the elastic-dockerfiles-publisher. * Add GH Action to 8.0 * Update kibana/Dockerfile Co-authored-by: Jonathan Budzenski <[email protected]> * Update kibana/Dockerfile Co-authored-by: Jonathan Budzenski <[email protected]> * Update kibana/Dockerfile Co-authored-by: Jonathan Budzenski <[email protected]> * Update kibana/Dockerfile Co-authored-by: mgreau <[email protected]> Co-authored-by: Maxime Gréau <[email protected]> Co-authored-by: Jonathan Budzenski <[email protected]>
I am running this on CentOS 7, with docker 1.10.3.
I am unable to use the image to launch a container.
My docker-compose.yml file is here:
version: '2'
services:
elasticsearch:
image: elasticsearch:2.3.0
ports:
- 127.0.0.1:9200:9200
- 127.0.0.1:9300:9300
volumes:
- /opt/elasticsearch/config:/usr/share/elasticsearch/config
- /opt/elasticsearch/data:/usr/share/elasticsearch/data
I am unable to launch a container using any version for the elastic search image.
I receive the AccessDeniedException: /usr/share/elasticsearch/config/scripts error. When I add an additional volume line ( - /opt/elasticsearch/scripts:/usr/share/elasticsearch/scripts), and chmod the /opt/elasticsearch dir to 777 (as some have suggested, but is not satisfactory), I then find that there are no configs populated.
A similar (or duplicate) issue was closed awhile ago, and was specifically related to OSX- but in this case it is all linux.
The text was updated successfully, but these errors were encountered: