Solution 1 :

The man page of wget says that :

Code 8 : Server issued an error response.

With the exceptions of 0 and 1, the lower-numbered exit codes take
precedence over higher-numbered ones, when multiple types of errors
are encountered.

Knowing that, I guess the other layers are working fine (Network, SSL, authent, etc…).

I think it’s an application error, like a malfunction of the web server that should give you an answer. Can you restart the applications on the servers returning this code to make sure?

Hoping it can help, let me know !

Problem :

I am using wget in the back-end of a website to get the HTML of web pages. It works fine most of the times, but with specific websites, it returns this error (exit status = 8). When I use wget in the terminal with these websites, it works without any problems (exit status = 0).


Comment posted by douhayoun

If your request is complex, do you have a way to simply request these servers? With a /health, or a /status?

Comment posted by a_coder

Thanks for helping, I read the docs and didn’t get anything useful, and if the remote server is malfunctioning ,then it should not work with wget when I use it in the terminal, but it works. @douhayoun

Comment posted by douhayoun

Sorry I didn’t get that was working via a manual curl. If the curl you are using is the same between your app and your manual curl, there is a possibility that your app is blacklisted from these servers if you are making a lot of request at once. Do you have a way of checking that ?

Comment posted by a_coder

Although I do not have a way of knowing whether the server is blacklisted or not, unfortunately, I think that this is the case, anyways, I am using pythonanywhere, please let me know if there is a way of knowing whether it is black listed or not. Thanks for your help