# Logstash not able to output to ES error occurred sending bulk request

**URL:** https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000
**Category:** Logstash
**Created:** [November 16, 2018, 7:54am UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000 "2018-11-16T07:54:28Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)
#### Post date: [November 16, 2018, 7:54am UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000/1 "2018-11-16T07:54:28Z")

</div>

I am able to see the output in stout but when I am indexing to ES it gives this error

The thing is if I am connecting to Hive from jdbc input this error comes. I am able to index data from oracle.

An error occurred sending a bulk request to elasticsearch. We will retry indefinitely. :error\_message=\> no method 'setHeaders' for arguments on Java:orgapachehttpclientmethod::httppost\n available overload:\n :error\_class:nameerror

However I am able to stout events from Hive no error there

---

<div class="post-metadata">

### Author: ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)
#### Post date: [November 17, 2018, 3:53pm UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000/2 "2018-11-17T15:53:01Z")

</div>

Not sure why this is happening I am able to output hive's data in many output like stout, csv, email. Everything works expect elasticsearch output. Why?

Moreover I am able to output to ES from various input sources like csv, oracle etc

@magnusbaeck Can you assist.

 ![20181117_212516](https://us1.discourse-cdn.com/elastic/original/3X/0/4/04f822604a1243a07048f2d374eb80342d0f278a.jpeg)

---

<div class="post-metadata">

### Author: ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)
#### Post date: [November 17, 2018, 3:57pm UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000/3 "2018-11-17T15:57:58Z")

</div>

+more

 ![20181117_212132](https://us1.discourse-cdn.com/elastic/original/3X/b/8/b8618a3a134689bf257b328f93b6e85ca250c30c.jpeg)

---

<div class="post-metadata">

### Author: ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)
#### Post date: [November 17, 2018, 4:12pm UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000/4 "2018-11-17T16:12:59Z")

</div>

![20181117_213856](https://us1.discourse-cdn.com/elastic/original/3X/e/0/e024dd62174b33e62d4d6394ce3bf2f90331b1da.jpeg)

PLEASE HELP. THIS IS MY CONFIG FILE.

For some reason I think that es output is sending some additional fields to host with some garbage values. Or some additional library is required for in jdbc input .

---

<div class="post-metadata">

### Author: ![balumurari1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/balumurari1/32/39203_2.png) [@balumurari1](https://discuss.elastic.co/u/balumurari1)
#### Post date: [November 20, 2018, 6:02am UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000/5 "2018-11-20T06:02:01Z")

</div>

hope this helps you,  
Make sure you are giving correct database connection details and then follow below sample example

> [@Synchronize data to es and customize es index structure](https://discuss.elastic.co/t/synchronize-data-to-es-and-customize-es-index-structure/154098/2):
>
> use below input code to connect to databse and load data from both the tables, in case of "statement", write join query to retrieve data from both tables, input { jdbc { jdbc\_driver\_library =\> "D:/Softwares/logstash-6.4.2/lib/com.mysql.jdbc\_5.1.5.jar" jdbc\_driver\_class =\> "com.mysql.jdbc.Driver" jdbc\_connection\_string =\> "jdbc:mysql://localhost:3306/test" jdbc\_user =\> "root" jdbc\_password =\> "root" statement =\> "SELECT \* FROM sample" jdbc\_paging\_enabled =\> "true" jdbc\_page\_size =\> "50…

---

<div class="post-metadata">

### Author: ![Divit\_Sharma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/divit_sharma/32/32348_2.png) [@Divit\_Sharma](https://discuss.elastic.co/u/Divit_Sharma)
#### Post date: [November 22, 2018, 12:07pm UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000/6 "2018-11-22T12:07:30Z")

</div>

I am able to make connection and see data in stdout. Its just that it won't index to ES if source is hive.

---

<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: [December 20, 2018, 12:07pm UTC](https://discuss.elastic.co/t/logstash-not-able-to-output-to-es-error-occurred-sending-bulk-request/157000/7 "2018-12-20T12:07:43Z")

</div>

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