Bulk Index "ElasticsearchParseException Failed to derive xcontent"


(ganeshbabu) #1

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' --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


(Mark Walkom) #2

What's in the json file?


(ganeshbabu) #3

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


(Mark Walkom) #4

No idea at all.


(system) #5