# Bulk Index "ElasticsearchParseException Failed to derive xcontent"

**URL:** https://discuss.elastic.co/t/bulk-index-elasticsearchparseexception-failed-to-derive-xcontent/41748
**Category:** Elasticsearch
**Created:** [February 15, 2016, 8:41am UTC](https://discuss.elastic.co/t/bulk-index-elasticsearchparseexception-failed-to-derive-xcontent/41748 "2016-02-15T08:41:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)
#### Post date: [February 15, 2016, 8:41am UTC](https://discuss.elastic.co/t/bulk-index-elasticsearchparseexception-failed-to-derive-xcontent/41748/1 "2016-02-15T08:41:59Z")

</div>

Hi All,

I am trying to index doc using bulk api but I am getting "ElasticsearchParseException[Failed to derive xcontent]"

**Below shell file created for index docs using bulk**

#!/bin/bash

for file\_name in non\_std\_item\_json04.json  
do  
echo ${file\_name} \>\> non\_std\_item\_load04.log  
date \>\> non\_std\_item\_load04.log  
curl --user eswriteuser:xxxx01 -XPOST '[http://10.7.41.122:9280/es\_item/item/\_bulk](http://10.7.41.122:9280/es_item/item/_bulk)' --data-binary @${file\_name} \>\> non\_std\_item\_details04.log  
done

Below error which I got in the item details04 log file,

**{"error":"ElasticsearchParseException[Failed to derive xcontent]","status":400}**

The size of file is nearly 825 MB.

Please help us to resolve this error.

Thanks,  
Ganeshbabu R

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 15, 2016, 4:15pm UTC](https://discuss.elastic.co/t/bulk-index-elasticsearchparseexception-failed-to-derive-xcontent/41748/2 "2016-02-15T16:15:03Z")

</div>

What's in the json file?

---

<div class="post-metadata">

### Author: ![r.ganeshbabu](https://avatars.discourse-cdn.com/v4/letter/r/4da419/32.png) [@r.ganeshbabu](https://discuss.elastic.co/u/r.ganeshbabu)
#### Post date: [February 15, 2016, 4:33pm UTC](https://discuss.elastic.co/t/bulk-index-elasticsearchparseexception-failed-to-derive-xcontent/41748/3 "2016-02-15T16:33:21Z")

</div>

Thanks for asking @warkolm

I looked into the file and it was unreadable format. May be file was corrupted normally we generate json flat file from db others file are looks good but we don't know how this file get's corrupted?

Do you have any idea how did it happened?

Regards,  
Ganeshbabu R

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [February 15, 2016, 5:55pm UTC](https://discuss.elastic.co/t/bulk-index-elasticsearchparseexception-failed-to-derive-xcontent/41748/4 "2016-02-15T17:55:56Z")

</div>

No idea at all.

---

<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: [July 5, 2017, 11:16pm UTC](https://discuss.elastic.co/t/bulk-index-elasticsearchparseexception-failed-to-derive-xcontent/41748/5 "2017-07-05T23:16:19Z")

</div>


