# Could not index event to elasticsearch maximum shards open

**URL:** <https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-maximum-shards-open/270524>\
**Category:** Elasticsearch\
**Created:** [April 19, 2021, 2:48am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-maximum-shards-open/270524 "2021-04-19T02:48:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![TrAMT](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@TrAMT](https://discuss.elastic.co/u/TrAMT)\
**Post date:** [April 19, 2021, 2:48am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-maximum-shards-open/270524/1 "2021-04-19T02:48:03Z")

</div>

Hi  
I have problem with Elasticsearch and Logstash. Here is the detail of log:

```auto
Apr 16 13:01:24 elastic7-logstash logstash[980]: [2021-04-16T13:01:24,828][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"winlogbeat-7.3.0-2019.08.22", :_type=>"_doc", :routing=>nil}, #<LogStash::Event:0x7e327a87>], :response=>{"index"=>{"_index"=>"winlogbeat-7.3.0-2019.08.22", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;"}}}}
Apr 16 13:01:24 elastic7-logstash logstash[980]: [2021-04-16T13:01:24,828][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"winlogbeat-7.3.0-2019.08.22", :_type=>"_doc", :routing=>nil}, #<LogStash::Event:0x5caece52>], :response=>{"index"=>{"_index"=>"winlogbeat-7.3.0-2019.08.22", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;"}}}}
Apr 16 13:01:24 elastic7-logstash logstash[980]: [2021-04-16T13:01:24,828][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"winlogbeat-7.3.0-2019.08.22", :_type=>"_doc", :routing=>nil}, #<LogStash::Event:0x1fc5b16f>], :response=>{"index"=>{"_index"=>"winlogbeat-7.3.0-2019.08.22", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;"}}}}
Apr 16 13:01:24 elastic7-logstash logstash[980]: [2021-04-16T13:01:24,828][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"winlogbeat-7.3.0-2019.08.22", :_type=>"_doc", :routing=>nil}, #<LogStash::Event:0x1901cbeb>], :response=>{"index"=>{"_index"=>"winlogbeat-7.3.0-2019.08.22", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;"}}}}
Apr 16 13:01:24 elastic7-logstash logstash[980]: [2021-04-16T13:01:24,829][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"winlogbeat-7.3.0-2019.08.22", :_type=>"_doc", :routing=>nil}, #<LogStash::Event:0x7e354641>], :response=>{"index"=>{"_index"=>"winlogbeat-7.3.0-2019.08.22", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;"}}}}
Apr 16 13:01:24 elastic7-logstash logstash[980]: [2021-04-16T13:01:24,829][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"winlogbeat-7.3.0-2019.08.22", :_type=>"_doc", :routing=>nil}, #<LogStash::Event:0x5624c1f3>], :response=>{"index"=>{"_index"=>"winlogbeat-7.3.0-2019.08.22", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;"}}}}
Apr 16 13:01:24 elastic7-logstash logstash[980]: [2021-04-16T13:01:24,829][WARN][logstash.outputs.elasticsearch] Could not index event to Elasticsearch. {:status=>400, :action=>["index", {:_id=>nil, :_index=>"winlogbeat-7.3.0-2019.08.22", :_type=>"_doc", :routing=>nil}, #<LogStash::Event:0x78945d6f>], :response=>{"index"=>{"_index"=>"winlogbeat-7.3.0-2019.08.22", "_type"=>"_doc", "_id"=>nil, "status"=>400, "error"=>{"type"=>"validation_exception", "reason"=>"Validation Failed: 1: this action would add [2] total shards, but this cluster currently has [999]/[1000] maximum shards open;"}}}}

```

And I see at Stack management \> Index management it has many index from the time before I installed the ELK. Image below  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/f/8f08a5d2dd6902c1ac858b40ead320c933b2c6a0.png)  
I dont know why and how to fix this. Plz help me

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 19, 2021, 3:02am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-maximum-shards-open/270524/2 "2021-04-19T03:02:21Z")

</div>

Welcome!

You can't have more than 1000 shards per node.

Here I think you have only one node.

So either you start 2 more nodes, or you remove some of the existing indices.

---

<div class="post-metadata">

**Author:** ![TrAMT](https://avatars.discourse-cdn.com/v4/letter/t/c0e974/32.png) [@TrAMT](https://discuss.elastic.co/u/TrAMT)\
**Post date:** [April 19, 2021, 3:50am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-maximum-shards-open/270524/3 "2021-04-19T03:50:07Z")

</div>

Thank you. How to Logstash doesnt collect log from the past.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [April 19, 2021, 7:47am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-maximum-shards-open/270524/4 "2021-04-19T07:47:06Z")

</div>

What is the output of:

```auto
GET /
GET /_cat/nodes?v
GET /_cat/health?v
GET /_cat/indices?v

```

If some outputs are too big, please share them on [gist.github.com](http://gist.github.com) and link them here.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 17, 2021, 7:47am UTC](https://discuss.elastic.co/t/could-not-index-event-to-elasticsearch-maximum-shards-open/270524/5 "2021-05-17T07:47:30Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
