# Error in BULK

**URL:** <https://discuss.elastic.co/t/error-in-bulk/73580>\
**Category:** Elasticsearch\
**Created:** [February 1, 2017, 7:44pm UTC](https://discuss.elastic.co/t/error-in-bulk/73580 "2017-02-01T19:44:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![manandappa](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@manandappa](https://discuss.elastic.co/u/manandappa)\
**Post date:** [February 1, 2017, 7:44pm UTC](https://discuss.elastic.co/t/error-in-bulk/73580/1 "2017-02-01T19:44:03Z")

</div>

I am trying to do a POST -bulk and am getting an error  
{  
"error": {  
"root\_cause": [  
{  
"type": "json\_e\_o\_f\_exception",  
"reason": "Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@5c64fb18; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@5c64fb18; line: 1, column: 3]"  
}  
],  
"type": "json\_e\_o\_f\_exception",  
"reason": "Unexpected end-of-input: expected close marker for Object (start marker at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@5c64fb18; line: 1, column: 1])\n at [Source: org.elasticsearch.transport.netty4.ByteBufStreamInput@5c64fb18; line: 1, column: 3]"  
},  
"status": 500  
}

How Can I find the why its failing?

---

<div class="post-metadata">

**Author:** ![nik9000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nik9000/32/44947_2.png) [@nik9000](https://discuss.elastic.co/u/nik9000)\
**Post date:** [February 2, 2017, 2:11am UTC](https://discuss.elastic.co/t/error-in-bulk/73580/2 "2017-02-02T02:11:56Z")

</div>

Sorry, yeah, that isn't a great error. The problem is that the json on one of your lines is invalid. `_bulk` first slices the json line by line and then parses it. It does this so the coordinating node doesn't have to parse the json for documents that it is just going to ship off to another node. So each line has to be a valid json document.

---

<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:** [March 2, 2017, 2:12am UTC](https://discuss.elastic.co/t/error-in-bulk/73580/3 "2017-03-02T02:12:12Z")

</div>

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