Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why curl: (56) Recv failure: Connection reset by peer? #1016

Closed
hwypengsir opened this issue Sep 16, 2016 · 6 comments
Closed

Why curl: (56) Recv failure: Connection reset by peer? #1016

hwypengsir opened this issue Sep 16, 2016 · 6 comments

Comments

@hwypengsir
Copy link

@hwypengsir hwypengsir commented Sep 16, 2016

I have build forword proxy on my vps.

curl -x "vps_ip:80"  https://www.yahoo.com

It get normal output on my terminal.

curl -x "vps_ip:80" https://dl-ssl.google.com/linux/linux_signing_key.pub

An error info occur.

curl: (56) Recv failure: Connection reset by peer

Why [url]https://www.yahoo.com[/url] can get by curl with forword proxy,[url]https://dl-ssl.google.com/linux/linux_signing_key.pub[/url] can't get by the same forword proxy on the same machine?

@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Sep 16, 2016

If you enable debug tracing with --trace-ascii dump.txt, does it shed any more light? "Recv failure" is a really generic error so its hard for us to tell without more info. Can you attach such a debug trace here and we might be able to tell something more?

@hwypengsir

This comment has been minimized.

Copy link
Author

@hwypengsir hwypengsir commented Sep 18, 2016

curl -x "vps_ip:80" --trace-ascii /tmp/dump.txt https://dl-ssl.google.com/linux/linux_signing_key.pub -o /tmp/key.pub
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (56) Recv failure: Connection reset by peer

cat /tmp/dump.txt
== Info: Hostname was NOT found in DNS cache
== Info: Trying vps_ip...
== Info: Connected to vps_ip (vps_ip) port 80 (#0)
== Info: Establish HTTP proxy tunnel to dl-ssl.google.com:443
=> Send header, 126 bytes (0x7e)
0000: CONNECT dl-ssl.google.com:443 HTTP/1.1
0028: Host: dl-ssl.google.com:443
0045: User-Agent: curl/7.38.0
005e: Proxy-Connection: Keep-Alive
007c:
== Info: Recv failure: Connection reset by peer
== Info: Received HTTP code 0 from proxy after CONNECT
== Info: Closing connection 0

@bagder

This comment has been minimized.

Copy link
Member

@bagder bagder commented Sep 18, 2016

It looks like your proxy simply doesn't respond properly here.

@hwypengsir

This comment has been minimized.

Copy link
Author

@hwypengsir hwypengsir commented Sep 20, 2016

To close the firewall ,problem solved.

@jay

This comment has been minimized.

Copy link
Member

@jay jay commented Sep 20, 2016

Ok thanks for the update.

@jay jay closed this Sep 20, 2016
@qingdi

This comment has been minimized.

Copy link

@qingdi qingdi commented Jul 27, 2017

close firewall is workless

@lock lock bot locked as resolved and limited conversation to collaborators May 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
4 participants
You can’t perform that action at this time.