org.elasticsearch.cluster.block.clusterblockexception:阻止者:[服务不可用/1/状态未恢复/初始化]

aiqt4smr  于 2021-06-13  发布在  ElasticSearch
关注(0)|答案(1)|浏览(778)

我正在使用elk6.8.9所有配置都在我的docker文件中。它工作的很好,但突然我得到了一个错误

org.elasticsearch.action.search.SearchPhaseExecutionException: all shards failed
or org.elasticsearch.cluster.block.ClusterBlockException: blocked by: [SERVICE_UNAVAILABLE/1/state not recovered / initialized];

我就是这样配置麋鹿的

elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch:6.8.9
    environment:
      - "ES_JAVA_OPTS=-Xms1g -Xmx1g"
    volumes:
      - /opt/services/data/elasticsearch:/usr/share/elasticsearch/data
    ports:
      - 9200:9200
    user: ${USER_ID}

随叫随到

curl -XGET 'localhost:9200/_cluster/health/balance_sheet?pretty'-- request
response -clear
{
  "cluster_name" : "docker-cluster",
  "status" : "red",
  "timed_out" : true,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 0,
  "active_shards" : 0,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 0,
  "delayed_unassigned_shards" : 0,
  "number_of_pending_tasks" : 0,
  "number_of_in_flight_fetch" : 0,
  "task_max_waiting_in_queue_millis" : 0,
  "active_shards_percent_as_number" : 100.0
}
xkrw2x1b

xkrw2x1b1#

假设你不关心这些数据(正如你在问题的评论中所说的-你可以删除你的 /opt/services/data/elasticsearch 本地计算机中的文件夹
趁你的容器还在的时候做 down 然后跑 up 再一次。

相关问题