I'm trying to run ElasticSearch with docker-compose, but it's not going well
docker-compose.yml
es:
image: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
ports:
- "9200:9200"
- "9300:9300"
environment:
- "discovery.type=single-node"
volumes:
- ./elasticsearch_data:/usr/share/elasticsearch/data
Error after starting up
"stacktrace": ["org.elasticsearch.bootstrap.StartupException: java.lang.IllegalStateException: failed to obtain node locks, tried [[/usr/share/elasticsearch/data]] with lock id [0]; maybe these locations are not writable or multiple nodes were started without increasing [node.max_local_storage_nodes] (was [1])?",
Even I run it without local volume, it throws exactly the same error.