January 5, 2023, 9:10am
I followed the article
here to start a multi node cluster using docker compose.
i also installed mapper-size plugin for each node, manually using command -
docker exec es02 elasticsearch-plugin install mapper-size
I then enabled _size in kibana (metadata) and created an index with _size mapping, indexed few documents for testing around the doc size etc.
The issue now is when i do docker-compose down and then docker-compose up -d. The containers wont start and fail with error -
"ERROR.message":"Failed to parse mappings for index [[testindex/1I5u-GDvTmaUGWru35Dclg]]"
I think it has something to do around _size mapping and mapper size plug-in. Any help on this please...?
you'll have to install the plugins every time after you do a
docker-compose down as they're not saved in the docker image.
You can either save the docker image once you've installed the plugins so you don't need to do it every time, or modify the docker-compose by adding the install plugin on each Elasticsearch node similar to this.
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- "./bin/elasticsearch-plugin install plugin1; ./bin/elasticsearch-plugin install plugin2; /usr/local/bin/docker-entrypoint.sh elasticsearch -E \"discovery.type=single-node\""
January 17, 2023, 3:48pm
@jacinto_calvo_sintes thanks for your reply.
I tried your approach by adding the command node for each elasticsearch node in yml file.
- "./bin/elasticsearch-plugin install mapper-size"
"curl -s --cacert config/certs/ca/ca.crt https://localhost:9200 | grep -q 'missing authentication credentials'",
however, i noticed that the containers exit immediately after they are created. The console in docker desktop shows
-> Installing mapper-size
-> Downloading mapper-size from elastic
-> Installed mapper-size
-> Please restart Elasticsearch to activate any plugins installed
i noticed that it requires restart of the container. how do i do that in the yml file?
You need to later run the
docker-entrypoint as with the install command you're overwriting the default action from the container when it starts.
In mi case, I run it after the plugin install command. I think some of the environment variables are lost when running from the command and had to add them with the -E option.
- "./bin/elasticsearch-plugin install plugin1; /usr/local/bin/docker-entrypoint.sh elasticsearch -E \"discovery.type=single-node\""
Hope this helps.
February 15, 2023, 8:49am
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.