繁体   English   中英

ElasticSearch java.io.IOException:无法在 docker 中读取...

[英]ElasticSearch java.io.IOException: failed to read ... in docker

我试图在 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版本: 19.03.5, build 633a0ea838
  • 1.24.0, build 0aa59064 -compose 版本: 1.24.0, build 0aa59064
  • Ubuntu 18.04.3 LTS

看起来您正在使用先前版本的 elasticsearch 中的卷。

尝试将您的./db-files/elasticsearch-data更改为新的内容。 ./db-files/elasticsearch-data-2或使用docker docker volume rm删除旧卷。

使用docker volume ls找出需要删除的卷。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM