Curl Error 56 "Failure when receiving data from the peer" while sending .tar.gz File
Asked Answered
R

4

20

I have a problem with this CURL call:

curl -X POST \
     --data-binary '@File01.tar.gz' \
     http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02.tar.gz

And I receive this error:

curl: (56) Failure when receiving data from the peer

But if I do this CURL:

curl -X POST \
     --data-binary '@File01.tar.gz' \
     http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02

Its works well.

Why is that?

Rhythmist answered 22/1, 2015 at 10:50 Comment(0)
S
22

cURl error 56 can have different reason like:

  1. Passing data to be uploaded in URL itself instead of POST request
  2. Probably Proxy blocking the request to the server.
  3. In some cases, server do not support particular request, like some servers support PUT/POST any one of them.

When I received this error last time, it was proxy blocking the request to the server.

But in your case, in non working case:

curl -X POST \
     --data-binary '@File01.tar.gz' \
     http://website.intra.prova.it/gore-orgac/PINGU/TEST/lots/Test_017/content/files/File02.tar.gz

you have appended the file to be POST in URL itself, which is the location actually not available on server,

These can be reason not sure, it happened to me long back while playing with cURL command-line.

Sibel answered 22/1, 2015 at 12:35 Comment(2)
is there any way for get more detail logs, so we can know the error essential reason.Tweed
Use curl -v to see more information on what's happening. You can also use curl --trace-ascii <filename>for a file dump of all incoming and outgoing information. See the docs for more info: curl.se/docs/manpage.htmlMchenry
M
2

This happened to me because my POST data was too big. I was doing:

curl -X POST localhost:9200/_bulk --data-binary @too-big.file

To resolve the issue, i split the file into 2 parts with:

split -l 150000 too-big.file

Then ran 2 POSTS:

curl -X POST localhost:9200/_bulk --data-binary @xaa
curl -X POST localhost:9200/_bulk --data-binary @xab
Massa answered 12/4, 2015 at 15:31 Comment(0)
R
0

Check both ends are in secure or non-secure servers.

Rabideau answered 23/7, 2023 at 14:2 Comment(0)
G
-3

Mine was related to the Parsoid Service / VisualEditor for the MediaWiki environment

sudo service parsoid restart

Fixed it in my case

Gratuitous answered 28/11, 2018 at 23:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.