我试图在docker上用deffirents版本重新组装一个用于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
- 优麒麟 18.04.3 LTS
看起来您正在使用以前版本的 elasticsearch 中的卷。
尝试将你的./db-files/elasticsearch-data更改为新的东西。像./db-files/elasticsearch-data-2或使用docker volume rm
删除旧卷。
使用docker volume ls
找出需要删除的卷。