wget gets Read error (Connection reset by peer) in headers
Asked Answered
E

4

6

I searched a lot but no solution helped me with this problem where I get this error constantly.

HTTP request sent, awaiting response... Read error (Connection reset by peer) in headers. Retrying.

I tried the following inputs.

wget url
wget -O url
wget -O url username="user" password="pass" host="host" (something like this)

I am just trying to download html from a secure website page but all the time it shows the error. So I tried to download any web page but still not working. Is it any server configuration problem?

Elitism answered 28/3, 2018 at 19:53 Comment(6)
Can you ping the destination?Sicilia
Try cURL, there may be restrictions based on user-agentWang
Usually user-agent filtering gives an error. Connection reset by peer is usually network issues.Sicilia
Thank You. let me try. @Tripp, yes I can ping.Elitism
I tried curl. but it shows same error. @WangElitism
@GLYusuf but you can load this url with your desktop browser, right?Wang
L
4

This error can occur if you access a website via HTTP but it's trying to redirect you to HTTPS

So if your command was

wget http://url

Try changing it to

wget https://url
Livialivid answered 11/3, 2021 at 5:43 Comment(0)
B
3

I encountered a similar issue today, our IT team suggests to use "https" over "http" in the url and use "wget --no-check-certificate", it worked for me.

Websites may stop serving the unencrypted http transfer at some point, which might lead to the issue.

Bridgman answered 14/6, 2022 at 16:24 Comment(0)
M
0

try with "sudo" privilege, it worked for me.

sudo wget url
Muliebrity answered 9/6, 2022 at 7:15 Comment(0)
E
-1

This following command works form me.

wget -O test.html http://url --auth-no-challenge --force-directories

Elitism answered 29/3, 2018 at 8:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.