# Logstash elasticsearch input retries forever when index does not exist

**URL:** <https://discuss.elastic.co/t/logstash-elasticsearch-input-retries-forever-when-index-does-not-exist/127701>\
**Category:** Logstash\
**Created:** [April 11, 2018, 9:05pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-retries-forever-when-index-does-not-exist/127701 "2018-04-11T21:05:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![santana](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/santana/32/3180_2.png) [@santana](https://discuss.elastic.co/u/santana)\
**Post date:** [April 11, 2018, 9:05pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-retries-forever-when-index-does-not-exist/127701/1 "2018-04-11T21:05:23Z")

</div>

I use logstash for exporting elastic search indexed data to another system. Indexes in elastic search are created per month. When starting logstash i can see in the logs this exception logged every seconds, i would hope the process to stop and receive a response code 1 but the process keeps on until i stop the process

Error

{:timestamp=\>"2018-04-11T16:59:20.552000-0400", :message=\>"A plugin had an unrecoverable error. Will restart this plugin.\n Plugin: \<LogStash::Inputs::Elasticsearch hosts=\>["[myhost.com:19301](http://myhost.com:19301)"], index=\>"events-2018-04", docinfo=\>true, docinfo\_fields=\>["\_id"], query=\>"{ \"query\": { \"match\_all\": {} }}", codec=\>\<LogStash::Codecs::JSON charset=\>"UTF-8"\>, scan=\>true, size=\>1000, scroll=\>"1m", docinfo\_target=\>"@metadata", ssl=\>false\>\n Error: [404] {"error":{"root\_cause":[{"type":"index\_not\_found\_exception","reason":"no such index","index":"events-2018-04","resource.type":"index\_or\_alias","resource.id":"events-2018-04"}],"type":"index\_not\_found\_exception","reason":"no such index","index":"events-2018-04","resource.type":"index\_or\_alias","resource.id":"events-2018-04"},"status":404}", :level=\>:error}

pipeline file

input {  
elasticsearch {  
hosts =\> ["${HOST}:${PORT}"]  
index =\> "${INDEX}"  
docinfo =\> true  
docinfo\_fields =\> ["\_id"]  
query =\> '{ "query": { "match\_all": {} }}'  
}

}

filter {  
mutate {  
remove\_field =\> ["@version", "@timestamp"]  
add\_field =\> { "\_id" =\> "%{[@metadata][\_id]}" }

}

}

output {  
# stdout { codec =\> rubydebug }  
file {  
path =\> "${FILENAME}"  
}  
}

Thanks for your help

---

<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 9, 2018, 9:05pm UTC](https://discuss.elastic.co/t/logstash-elasticsearch-input-retries-forever-when-index-does-not-exist/127701/2 "2018-05-09T21:05:25Z")

</div>

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