# Logstash 400

**URL:** <https://discuss.elastic.co/t/logstash-400/201871>\
**Category:** Logstash\
**Created:** [October 1, 2019, 9:16pm UTC](https://discuss.elastic.co/t/logstash-400/201871 "2019-10-01T21:16:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jtdepalm](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jtdepalm](https://discuss.elastic.co/u/jtdepalm)\
**Post date:** [October 1, 2019, 9:16pm UTC](https://discuss.elastic.co/t/logstash-400/201871/1 "2019-10-01T21:16:20Z")

</div>

Hello all,

Some background:

My Elasticsearch cluster is in Azure. I used the Azure template ( [https://www.elastic.co/blog/deploying-elasticsearch-on-microsoft-azure](https://www.elastic.co/blog/deploying-elasticsearch-on-microsoft-azure) ) to initially create the cluster with a Kibana VM, Logstash VM, 3 Master VMs, and 3 Data Node VMs. After configuration everything worked great and I was taking in 1000s of logs/ day.

I recently re-ran the template to create another 6 Data Node VMs. The idea was to use the new 6 as part of a hot-warm-cold architectore. I read somewhere that doing so would not replace what already exists. This was mostly true.

The script created 6 more nodes, but also replaced the elasticsearch.yml of each of my previously existing nodes. The script did first back-up my original elasticsearch.yml (I also did have my own backups) so I was able to quickly get back to where I once was.

However, starting logstash backup I now get a bunch of error codes 400.

[2019-10-01T21:05:34,671][ERROR][logstash.outputs.elasticsearch] Encountered a retryable error. Will Retry with exponential backoff {:code=\>400, :url=\>"[http://10.15.1.108:9200/\_bulk](http://10.15.1.108:9200/_bulk)"}

Scrolling through I also see this error:

Read timed out {:url=\>[http://elastic:xxxxxx@10.15.1.108:9200/](http://elastic:xxxxxx@10.15.1.108:9200/), :error\_message=\>"Elasticsearch Unreachable: [[http://elastic:xxxxxx@10.15.1.108:9200/](http://elastic:xxxxxx@10.15.1.108:9200/)][Manticore::SocketTimeout] Read timed out", :error\_class=\>"LogStash::Outputs::ElasticSearch::HttpClient::Pool::HostUnreachableError"}

10.15.1.108 is my loadbalancer and did previously work before all of these changes. I have since removed all the new VMs from behind the loadbalancer, but I still get the above error. I've even removed all my logstash config files save one and still get this error.

Hell, I've even tried this:  
sudo /usr/share/logstash/bin/logstash -e 'input { stdin { } } output { elasticsearch { hosts=\>["10.15.1.108:9200"] user=\> "elastic" password=\>"\*\*" } }'

And still get the same error. I have also tried directly outputting to one of the elasticsearch data nodes, but still the same error.

Some interesting finds, through doing a curl on each of the nodes I see they all have different UUIDs. Should they be the same?

I also noticed one of the 3 nodes has a UUID of "_na_".

Could this be the culprit?  
Further information: From my Kibana, if I set the date to display data from when everythign was working I do get expected results.

Any help whatsover would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![jtdepalm](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jtdepalm](https://discuss.elastic.co/u/jtdepalm)\
**Post date:** [October 1, 2019, 9:18pm UTC](https://discuss.elastic.co/t/logstash-400/201871/2 "2019-10-01T21:18:35Z")

</div>

I also have no idea why logastash is doing a \_bulk request. I assume this is because I have many nodes?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 1, 2019, 9:33pm UTC](https://discuss.elastic.co/t/logstash-400/201871/3 "2019-10-01T21:33:35Z")

</div>

logstash always uses the bulk interface because it is more effecient (it can load 125 events with a single call).

I can't help with the 400 errors.

---

<div class="post-metadata">

**Author:** ![jtdepalm](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jtdepalm](https://discuss.elastic.co/u/jtdepalm)\
**Post date:** [October 2, 2019, 7:53pm UTC](https://discuss.elastic.co/t/logstash-400/201871/4 "2019-10-02T19:53:37Z")

</div>

Some progress! After much checking of things (finding a data node is no longer part of the cluster -still not fixed) I determined that functionality resumes once I tell logstash to output to a new/different index.

Previously:  
index =\> "logstash-%{+YYYY.MM.dd}"

Now:  
index =\> "wincollect-%{+YYYY.MM.dd}"

Just that small change in a logstash config file and I'm back up and running (have bad data node turned off now)

Can someone explain to me what's happened here?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 2, 2019, 8:11pm UTC](https://discuss.elastic.co/t/logstash-400/201871/5 "2019-10-02T20:11:22Z")

</div>

If moving to a different index stopped the 400 errors that suggests to me that the data was incompatible with the index template. Were you getting mapping errors in the elasticsearch logs?

---

<div class="post-metadata">

**Author:** ![jtdepalm](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jtdepalm](https://discuss.elastic.co/u/jtdepalm)\
**Post date:** [October 2, 2019, 8:53pm UTC](https://discuss.elastic.co/t/logstash-400/201871/6 "2019-10-02T20:53:55Z")

</div>

I checked elasticsearch.log on the running nodes and did not find any errors.

Could be that one of the main nodes was down and that caused the issue?

Thanks for the quick replies!

---

<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:** [October 30, 2019, 9:06pm UTC](https://discuss.elastic.co/t/logstash-400/201871/7 "2019-10-30T21:06:36Z")

</div>

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