Skip to content

Commit

Permalink
Fix elasticsearch installation (#14)
Browse files Browse the repository at this point in the history
* Fix elasticsearch installation

Newer default version of elasticsearch has a geoip database indice by default
https://discuss.elastic.co/t/how-to-disable-geoip-usage-in-7-14-0/281076

This means that the default indices on the file system have syntax relative to the newer version of ES so when we downgrade to a Magento compatible version it all goes wrong and fails to boot with an error like
```
Caused by: org.apache.lucene.index.IndexFormatTooNewException: Format version is not supported
```

This PR adds some future useful debugging information as well as fixes the error
  • Loading branch information
convenient authored Jan 27, 2022
1 parent 3fc9abf commit d3331a4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions travis-install-magento.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,14 @@ function assert_alive() {

function install_elasticsearch() {
sudo apt-get remove elasticsearch -y
sudo rm -rf /etc/elasticsearch /etc/default/elasticsearch /var/lib/elasticsearch/
curl -O https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-amd64.deb
sudo dpkg -i --force-confnew elasticsearch-7.6.2-amd64.deb
sudo chown elasticsearch:elasticsearch /etc/default/elasticsearch
sudo service elasticsearch restart
sudo service elasticsearch restart || sudo journalctl -xe
sleep 5
curl -XGET 'localhost:9200' | grep "You Know, for Search"
curl -XGET 'localhost:9200'
curl -XGET 'localhost:9200/_cat/indices?v'
}

install_elasticsearch
Expand Down

0 comments on commit d3331a4

Please sign in to comment.