I am using ES 5.5.1 running within Docker containers spread across 3 AWS EC2 instances. These are run based on the official Elastic Docker image from docker.elastic.co/elasticsearch/elasticsearch:5.5.1, with the repository-s3 plugin being installed as a step within my Dockerfile. However, when I try to start my nodes with this plugin installed, they seem to throw a variety of exceptions. If I start the nodes using the exact same config but without the repository-s3 plugin, then everything starts as expected.
The contents of one of the docker-compose files is as follows:
version: '2'
services:
elasticsearch1:
image: docker.elastic.co/elasticsearch/elasticsearch:5.5.1
container_name: elasticsearch1
restart: always
environment:
- cluster.name=docker-cluster
- node.master=true
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms1g -Xmx1g -Djava.net.preferIPv4Stack=true -Djava.net.preferIPv4Addresses"
- "network.publish_host=172.31.32.168:9300"
- "discovery.zen.ping.unicast.hosts=172.31.32.168:9300,172.31.104.72:9300,172.31.167.200:9300"
- "discovery.zen.ping_timeout=5m"
- "discovery.zen.minimum_master_nodes=2"
- "network.bind_host=0.0.0.0"
- "xpack.security.enabled=false"
- "xpack.ml.enabled=false"
- "xpack.watcher.enabled=false"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
volumes:
- esdata1:/usr/share/elasticsearch/data
ports:
- 9200:9200
- 9300:9300
volumes:
esdata1:
driver: local
And the contents of the Dockerfile is as follows:
FROM docker.elastic.co/elasticsearch/elasticsearch:5.5.1
USER elasticsearch
RUN elasticsearch-plugin install --batch repository-s3 && \
bin/elasticsearch-keystore create && \
echo ************ | bin/elasticsearch-keystore add -stdin cloud.aws.s3.access_key && \
echo ************ | bin/elasticsearch-keystore add -stdin cloud.aws.s3.secret_key
Hence the only difference between the 2 setups is that the s3-repository has been installed, along with the keys being added to the keystore.
The logs can be found here (wouldn't let me put them here due to character limit):
https://pastebin.com/mQnFfZ3F
NB - The discovery is using the standard zen unicast discovery as I couldn't seem to get the EC2 discovery plugin working either.