我试图用deffirents版本在docker上重新组装用于Elasticsearch的容器,但是我仍然遇到此错误。
org.elasticsearch.bootstrap.StartupException: ElasticsearchException[java.io.IOException: failed to read [id:1, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/node-1.st]]; nested: IOException[failed to read [id:1, legacy:false, file:/usr/share/elasticsearch/data/nodes/0/_state/node-1.st]]; nested: IllegalArgumentException[[node_meta_data] unknown field [node_version], parser not found];
这是我的用于Elasticsearch的配置DockerFile:
ur_elasticsearch:
container_name: "ur_elasticsearch"
image: docker.elastic.co/elasticsearch/elasticsearch:5.3.1
environment:
- xpack.security.enabled=false
- http.host=0.0.0.0
- transport.host=127.0.0.1
ports:
- "9200:9200"
volumes:
- ./db-files/elasticsearch-data:/usr/share/elasticsearch/data
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health || exit 1"]
interval: 60s
timeout: 30s
retries: 3
19.03.5, build 633a0ea838
1.24.0, build 0aa59064
最佳答案
看起来您正在使用前一版本的elasticsearch中的卷。
尝试将./db-files/elasticsearch-data更改为新的内容。类似于./db-files/elasticsearch-data-2或使用docker volume rm
删除旧卷。
使用docker volume ls
找出需要删除的卷。
关于docker - ElasticSearch java.io.IOException:无法在Docker中读取…,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59789278/