es 单节点问题

1、单节点部署,相同分片不能在一个节点上。

 curl -s -u elastic:$BK_ES7_ADMIN_PASSWORD -X GET "http://192.168.60.206:9200/_cluster/health?pretty"
{
  "cluster_name" : "bkee-es",
  "status" : "yellow",
  "timed_out" : false,
  "number_of_nodes" : 1,
  "number_of_data_nodes" : 1,
  "active_primary_shards" : 4,
  "active_shards" : 4,
  "relocating_shards" : 0,
  "initializing_shards" : 0,
  "unassigned_shards" : 3,
  "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" : 57.14285714285714
}

解决方式:

curl -s -u elastic:$BK_ES7_ADMIN_PASSWORD -X PUT "192.168.60.206:9200/_settings" -H 'Content-Type: application/json' -d '{"number_of_replicas":0}'

 

posted @ 2021-08-24 16:05  JvvYou  阅读(385)  评论(0编辑  收藏  举报