# Getting error "Failure when receiving data from the peer" for loading bulk data

**URL:** <https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404>\
**Category:** Elasticsearch\
**Created:** [September 30, 2015, 12:29pm UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404 "2015-09-30T12:29:16Z")\
**Posts on this page:** 7\
**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:** [September 30, 2015, 12:29pm UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404/1 "2015-09-30T12:29:16Z")

</div>

Hi,

I am having a frequently occurring problem that is affecting the loading bulk data to the index  
I have elasticsearch 1.7 installed with java 8.  
When I am trying to load bulk data using curl command the problem occurs,( **Failure when receiving data from the peer** )  
I wrote shell script and inside that I mentioned the curl command where I load bulk data using json documents.

**Sample shell script file:-**

for file\_name in load\_json01\*.json  
do  
echo ${file\_name} \>\> bulk\_load.log  
date \>\> bulk\_load.log  
curl --user admin:password -XPOST '[http://localhost](http://localhost):port/load\_data/data/\_bulk' --data-binary @${file\_name} \>\> bulk\_load01\_details.log  
done

I executed the shell script in putty, The following error as shown

% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
60 174M 0 0 60 104M 0 110M 0:00:01 --:--:-- 0:00:01 110M  
**curl: (56) Failure when receiving data from the peer**

Please guide me to fix this issue.

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:** [September 30, 2015, 3:00pm UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404/2 "2015-09-30T15:00:48Z")

</div>

What do the ES logs show?

---

<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:** [October 1, 2015, 10:07am UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404/3 "2015-10-01T10:07:12Z")

</div>

Mark,

I am running this shell file as a background process, The following command is

**nohup ./bulk\_load.sh &**

When I checking the log nohup.out (using command cat nohup.out) I found the following details

I Provided Sample details because it got thousands of data

{"took":42207,"errors":false,"items":[{"index":{"\_index":"bulk\_item","\_type":"item","\_id":"10129","\_version":1,"status":201}}

But error is showing in putty as shown below

% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed  
60 174M 0 0 60 104M 0 110M 0:00:01 --:--:-- 0:00:01 110M  
**curl: (56) Failure when receiving data from the peer**

Regards  
Ganesh

---

<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:** [October 3, 2015, 11:27pm UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404/4 "2015-10-03T23:27:21Z")

</div>

Right, but what about the actual Elasticsearch instance, there should be something in the logs for that.

---

<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:** [October 6, 2015, 12:57pm UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404/5 "2015-10-06T12:57:41Z")

</div>

Hi mark,

Sorry for replying late..

I missed this error part while updating. Below is an issue while loading bulk data.

**curl (23) Failed to writing body** --\> Could you please tell us why it is failed to write the data?

In that actual ElasticSearch Instance, the below error is shown in the log file while during bulk load.

[2015-10-06 07:18:52,933][WARN][monitor.jvm] [QA\_MASTER] [gc][old][3545][835] duration [16.1s], collections [1]/[16.9s], total [16.1s]/[1.3h], memory [9.6gb]-\>[9.3gb]/[9.7gb], all\_pools {[young] [2.1gb]-\>[2gb]/[2.1gb]}{[survivor] [154.8mb]-\>[0b]/[274.5mb]}{[old] [7.3gb]-\>[7.3gb]/[7.3gb]}  
[2015-10-06 07:19:07,800][WARN][monitor.jvm] [QA\_MASTER] [gc][old][3547][836] duration [12.9s], collections [1]/[13.1s], total [12.9s]/[1.4h], memory [9.7gb]-\>[9.3gb]/[9.7gb], all\_pools {[young] [2.1gb]-\>[2gb]/[2.1gb]}{[survivor] [245.2mb]-\>[0b]/[274.5mb]}{[old] [7.3gb]-\>[7.3gb]/[7.3gb]}  
[2015-10-06 07:19:21,772][WARN][monitor.jvm] [QA\_MASTER] [gc][old][3548][837] duration [13.7s], collections [1]/[14.7s], total [13.7s]/[1.4h], memory [9.3gb]-\>[9.3gb]/[9.7gb], all\_pools {[young] [2gb]-\>[2gb]/[2.1gb]}{[survivor] [0b]-\>[0b]/[274.5mb]}{[old] [7.3gb]-\>[7.3gb]/[7.3gb]}  
**[2015-10-06 07:19:21,784][WARN][shield.transport.netty] [QA\_MASTER] Caught exception while handling client http traffic, closing connection [id: 0xc2df9476, /localhost:58382 =\> /localhost:9200]**  
**org.elasticsearch.common.netty.handler.codec.frame.TooLongFrameException: HTTP content length exceeded 104857600 bytes.**  
at org.elasticsearch.common.netty.handler.codec.http.HttpChunkAggregator.messageReceived(HttpChunkAggregator.java:169)  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
at org.elasticsearch.common.netty.handler.codec.http.HttpContentDecoder.messageReceived(HttpContentDecoder.java:135)  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:296)  
at org.elasticsearch.common.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:459)  
at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.callDecode(ReplayingDecoder.java:536)  
at org.elasticsearch.common.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ReplayingDecoder.java:435)  
at org.elasticsearch.common.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
at org.elasticsearch.common.netty.OpenChannelsHandler.handleUpstream(OpenChannelsHandler.java:74)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791)  
at org.elasticsearch.common.netty.handler.ipfilter.IpFilteringHandlerImpl.handleUpstream(IpFilteringHandlerImpl.java:154)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564)  
at org.elasticsearch.common.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:559)  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:268)  
at org.elasticsearch.common.netty.channel.Channels.fireMessageReceived(Channels.java:255)  
at org.elasticsearch.common.netty.channel.socket.nio.NioWorker.read(NioWorker.java:88)  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.process(AbstractNioWorker.java:  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:33  
org.elasticsearch.common.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89)  
org.elasticsearch.common.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178)

Please let me know if there is any fix for this issue.

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:** [October 6, 2015, 8:48pm UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404/6 "2015-10-06T20:48:06Z")

</div>

> [@r.ganeshbabu](#):
>
> HTTP content length exceeded 104857600 bytes.

I'd suggest you look around for solutions to that 🙂

---

<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:46pm UTC](https://discuss.elastic.co/t/getting-error-failure-when-receiving-data-from-the-peer-for-loading-bulk-data/31404/7 "2017-07-05T23:46:23Z")

</div>


