docker - ElasticSearch java.io.IOException:无法在 docker 中读取 ...
问题描述
我试图在 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
- Ubuntu 18.04.3 LTS
解决方案
看起来您正在使用以前版本的弹性搜索中的卷。
尝试将您的./db-files/elasticsearch-data更改为新的。喜欢./db-files/elasticsearch-data-2或删除旧卷docker volume rm
.
用于docker volume ls
找出需要删除的卷。
推荐阅读
- java - 通用二叉搜索树未正确添加新节点(Java)
- sql-server - 提取特殊字符之间的所有值 SQL
- php - 不能在不同的模态框中使用与选项相同的数据
- c# - 在不同端口上运行 localhost 调用 dotnet 应用程序的 Angular 应用程序在降级时获得无推荐人。由于 withCredentials?
- r - 如何在 Rshiny 应用程序中心的标签面板上方创建标题
- jekyll - How to check with Liquid if I am in the home page?
- python - Split pandas list to different column and calculate the counts
- r - 如何在 R Shiny 的 textInput 中传递一行代码?
- javascript - TypeError:无法读取 JSONPlaceholder 未定义的属性“url”
- python - 在 PyMongo 中创建列表