Installed ES 8.3.2 using docker on my local dev machine. Before this installation I had ES 6.3.2 running and I had deleted all my test indices in 6.3.2 before installing 8.3.2 so that I would avoid any v6 issues with 8 on my local dev. When I attempt docker-compose up --build
I get this error, right before my es container exits.
es_usamm-db | org.elasticsearch.ElasticsearchException: failed to bind service
es_usamm-db | Likely root cause: org.elasticsearch.gateway.CorruptStateException: Format version is not supported. Upgrading to [8.3.2] is only supported from version [7.17.0].
How do I completely wipe out any elasticsearch docker data so that I can just install 8.3.2? I thought deleting all indices in 6.3.2 would have allowed a clean install of 8.3.2, but there must still be some 6.3.2 data persisting somewhere?
Here is my docker-compose.yml
services:
elasticsearch:
container_name: es_usamm-db
image: docker.elastic.co/elasticsearch/elasticsearch:8.3.2
environment:
- node.name=es01
- cluster.name=es-docker-cluster
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
- xpack.security.enabled=false
- discovery.type=single-node
ulimits:
memlock:
soft: -1
hard: -1
volumes:
- data01:/usr/share/elasticsearch/data
- ./server/elastic/scripts:/server/elastic/scripts
ports:
- 9200:9200
networks:
- default
kibana:
container_name: kibana_usamm-db
image: docker.elastic.co/kibana/kibana:8.3.2
ports:
- 5601:5601
networks:
- default
2
Answers
Well in that case, I would recommend to delete all your docker images, container, Volumes etc.
Single Node Cluster
To get start with single node cluster you can refer below blog:
https://ashish.one/blogs/elastic-docker-compose/
Here is the steps from blog:
This cluster will include
For other stack like APM, beats etc please refer above link.
1. Make directory
2. Create
.env
fileSave and close.
3. Create
docker-compose.yml
fileSave and close.
3. Start
4. Stop
5. Stop with deleting network, containers and volumes
Multi Node Cluster
Please refer below official doc to spin multi node cluster.
https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html#docker-compose-file
I answered this on your forum post – https://discuss.elastic.co/t/elasticsearch-8-3-2-docker-org-elasticsearch-gateway-corruptstateexception/310765
but you need to use a new volume instead of reusing the old one – or delete all the files in the volume directory from your underlying OS
even if you delete all the indices from the old node/cluster, you still have things like cluster state that are stored, and these are only compatible if you step through the upgrade process