Skip to content
This repository has been archived by the owner on Apr 12, 2022. It is now read-only.

Elasticsearch 7.x support #95

Open
ewoks opened this issue May 14, 2019 · 11 comments
Open

Elasticsearch 7.x support #95

ewoks opened this issue May 14, 2019 · 11 comments

Comments

@ewoks
Copy link

ewoks commented May 14, 2019

Missing support for Elasticsearch 7.x which is the newest version. Simple update of versions in .ENV file to 7.0.1 renders following error:

ERROR: for elasticsearch Cannot create container for service elasticsearch: invalid mount config for type "bind": bind source path does not exist: /Users/<CurrentUser>/temp/es-docker-full/stack-docker/config/ssl/ca/ca.crt

@LouisLetcher
Copy link

any news?

@korjavin
Copy link

Does it depend of version?

@r00t1ng
Copy link

r00t1ng commented Jul 24, 2019

Hey guys. I have tried changing the tag in the environment to match 7.2.0 however I am getting the same error as ewoks.

@sikevux
Copy link

sikevux commented Jul 25, 2019

The error seems to cascade from this line:

unzip /config/ssl/docker-cluster-ca.zip -d /config/ssl

Basically the newer images seems to be missing unzip and thus the certs are never unpacked and this cascades to the error you're seeing.

To get it to work just do something like this:

diff --git a/scripts/setup-elasticsearch.sh b/scripts/setup-elasticsearch.sh
index a88222a..0648ea0 100755
--- a/scripts/setup-elasticsearch.sh
+++ b/scripts/setup-elasticsearch.sh
@@ -37,6 +37,10 @@ if [[ -n "$ELASTIC_PASSWORD" ]]; then
         echo "CA directory exists, removing..."
         rm -rf /config/ssl/ca
     fi
+    echo "Install unzip if needed..."
+    if ! command -v unzip &>/dev/null; then
+       yum -qy install unzip
+    fi
     echo "Unzip ca files..."
     unzip /config/ssl/docker-cluster-ca.zip -d /config/ssl
 

@kinzleb
Copy link

kinzleb commented Jul 29, 2019

In order to get 7.2.0 to work for me I had to make the change @sikevux shows above, and these:

  1. The cluster wasn’t electing a master, it appeared to be because we now need to set cluster.initial_master_nodes and we also need the value set in it to exactly match the node.name:

Add to docker-compose.yml (line 23)

    environment:
      - cluster.initial_master_nodes=elasticsearch

Add to elasticsearch.yml (line 4)

node.name: elasticsearch
  1. The kibana.yml seemed to change with the new version to now want elasticsearch.hosts instead of elasticsearch.url:

Change kibana.yml (line 5):
old

elasticsearch.url: https://elasticsearch:9200

new

elasticsearch.hosts: ["https://elasticsearch:9200"]
  1. The check to see if x-pack is enabled needs modified because the directory it used to look for isn’t there anymore — I just changed it to check for the existence of a x-pack file instead:

Change setup-elasticsearch.sh (line 10):
old

if [[ -d /usr/share/elasticsearch/bin/x-pack ]]; then

new

if [[ -f /usr/share/elasticsearch/bin/x-pack-env ]]; then

I should note that I was only interested in getting elasticsearch and kibana up and running at this point so I removed all of the other services this brings up and didn’t work through any issues you may encounter with them. After making the above changes though I was able to successfully login to the kibana from a browser.

@kartheekmannepalli
Copy link

I still get the same error after trying the above changes mentioned by kinzleb and sikevux. It does try to create the keystore and crt files but fails. Did anyone else find a way to get this working?

@smcllc
Copy link

smcllc commented Sep 19, 2019

I tried to update this for 7.3.2 and I get the crt errors too. I tried all of the fixes listed here and it just causes more issues. Is anyone maintaining this? I would love to be able to run this for a POC.

jwsy added a commit to jwsy/stack-docker that referenced this issue Sep 27, 2019
@miaozhongyin
Copy link

i still get the same error when i install elasticsearch:7.4.1 docker image. it's seem that this current version can not support 7.X . if you want continue use 7.X ,you can delete all about sercurty configure in docker-compose.yaml and other config file. then restart elasticsearch service.
i test it's worked.

@ovizii
Copy link

ovizii commented Dec 13, 2019

I need to deploy the more or less compelte ELK stack on one machine, just for testing purposes so this docker-compose.yml here seemed to incldue about everything needed for testing but its for an older 6.x version.

Does anyone have a docker-compose.yml for the 7.x versio navailable for testing purposes?

@LouisLetcher
Copy link

I need to deploy the more or less compelte ELK stack on one machine, just for testing purposes so this docker-compose.yml here seemed to incldue about everything needed for testing but its for an older 6.x version.

Does anyone have a docker-compose.yml for the 7.x versio navailable for testing purposes?

I have one but need to push it to a github repo. Will add later the link

@Jhutterer
Copy link

I ran through the changes in this post, I still can't get it to work @LouisLetcher any chance you have pushed that docker-compose.yml anywhere?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests