HI all, really would appreciated your help on the following. I have been running an ELK stack very successfully for over 2 years on version 5.x. There was a requirement to upgrade which I have done for all components (Elasticsearch, Logstash and Kibana) which was quite straight forward on centos 7.
Now I have errors in kibana:
"Request to Elasticsearch failed: {"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Trying to query 2305 shards, which is over the limit of 2300. This limit exists because querying many shards at the same time can make the job of the coordinating node very CPU and/or memory intensive. It is usually a better idea to have a smaller number of larger shards. Update [action.search.shard_count.limit] to a greater value if you really want to query that many shards at the same time."}],"type":"illegal_argument_exception","reason":"Trying to query 2305 shards, which is over the limit of 2300. This limit exists because querying many shards at the same time can make the job of the coordinating node very CPU and/or memory intensive. It is usually a better idea to have a smaller number of larger shards. Update [action.search.shard_count.limit] to a greater value if you really want to query that many shards at the same time."},"status":400}"
I have to admit I'm not an expert on the elasticsearch setup and optimized configuration.
My configuration:
I only have 1 node currently.
output of url -XGET http://localhost:9200/_cluster/settings?pretty :
[root@sc-logs-prd-01 kibana]# curl -XGET http://localhost:9200/_cluster/settings?pretty
{
"persistent" : {
"action" : {
"search" : {
"shard_count" : {
"limit" : "2300"
}
}
}
},
"transient" : { }
}
Output of curl -s http://localhost:9200/_cluster/health?pretty:
{
"cluster_name" : "sc-logger",
"status" : "yellow",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 2318,
"active_shards" : 2318,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 2046,
"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" : 53.11640696608616
}
output of curl -XGET http://localhost:9200/logstash-prd-year-2019.10.14?pretty:
settings" : {
"index" : {
"refresh_interval" : "5s",
"number_of_shards" : "5",
"provided_name" : "logstash-prd-year-2019.10.14",
"creation_date" : "1571011200824",
"number_of_replicas" : "1",
"uuid" : "qoHObP6uT_q26XQq0uGeoA",
"version" : {
"created" : "6050499"
Questions:
- I have no idea how to fix this and guessing it's something to do with the upgrade? I don;t want to just keep increasing the amount of shards.
- It look like I have 5 shards assigned to the indices - I have no idea if this is too many or not? and if so how I reduce for all historic and new indices.
- I only currently have 1 node in the cluster - perhaps I need to increase this?
- I have "number of replicas" set to 1 - does this mean the number of nodes or something else?
- I notice I have an awful lot of unassigned shards (2046) and don;t know if this is a problem or not, and if it is how I fix it.
Basically I'm in a bit of a mess!, so would really appreciate any help.
Many thanks.
huowen