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

标签 docker elasticsearch docker-compose

我试图用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
  • docker 版本:19.03.5, build 633a0ea838
  • docker-compose版本:1.24.0, build 0aa59064
  • Ubuntu 18.04.3 LTS
  • 最佳答案

    看起来您正在使用前一版本的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/

    相关文章:

    docker - cAdvisor prometheus 集成将 container_cpu_load_average_10s 返回为 0

    elasticsearch - 在Elasticsearch中,如何使用空格执行通配符搜索?

    docker - 使用 Docker 安装 PHP7 fpm 和 memcached

    docker - Docker 服务和 Docker 容器有什么区别?

    docker - docker-compose 中标签的实际用途是什么

    docker - 如何在docker-compose中指定要启动而不启动的容器? (docker run vs docker create)

    spring - 如何使用Spring Boot和Spock运行测试容器

    ruby-on-rails - Ruby on Rails使用命令行 ``计算图像的md5

    elasticsearch - Elasticsearch 地理空间搜索实现

    elasticsearch - 在ElasticSearch中搜索查询分数详细信息