Curl error 56 proxy connect aborted

Norberto Burciaga My personal Web Log Solving “Error in cURL request: Proxy CONNECT aborted” INTRODUCTION cURL is a tool that allows you to connect and communicate to many different types of servers with many different types of protocols, specially HTTP. Some times happens that from where you are, for security reasons, you need to […]

Содержание

  1. Norberto Burciaga
  2. My personal Web Log
  3. Solving “Error in cURL request: Proxy CONNECT aborted”
  4. Get curl: (56) Proxy CONNECT aborted using https example #1
  5. Comments
  6. Why does curl not work, but wget works?
  7. 2 Answers 2
  8. How to fix cURL 56 recv failure connection reset by peer in CentOS?
  9. Why does cURL 56 recv failure connection reset by peer occurs?
  10. How we fix this error cURL error?
  11. Idle server connection
  12. Bad repository
  13. Whitespace in the URL
  14. Conclusion
  15. PREVENT YOUR SERVER FROM CRASHING!
  16. 2 Comments
  17. Why curl: (56) Recv failure: Connection reset by peer? #1016
  18. Comments
  19. Footer

Norberto Burciaga

My personal Web Log

Solving “Error in cURL request: Proxy CONNECT aborted”

INTRODUCTION

cURL is a tool that allows you to connect and communicate to many different types of servers with many different types of protocols, specially HTTP.

Some times happens that from where you are, for security reasons, you need to do an HTTP call thru a proxy server, so you need to configure the proxy settings in your cURL options.

PROBLEM

“Error in cURL request: Proxy CONNECT aborted” when calling a URL using a proxy.

DESCRIPTION

To configure the proxy settings into the CURL call the following parameters were used:

CURLOPT_PROXY => $proxyHost,
CURLOPT_PORT => $prxoyPort,

Where $proxyHost and $proxyPort are php variables with values of the valid proxy host address and port number.

But this configuration was sending the Exception: “Error in cURL request: Proxy CONNECT aborted”.

Reading at the curl_setopt manual (1) it says:

CURLOPT_PORT: An alternative port number to connect to

and it was noticed that the following format is being used in some of the examples:

SOLUTION

The CURLOPT_PORT option was not used and instead the port was added to the CURLOPT_PROXY option as concatenation host:port like the following:

CONCLUSION

Some proxies also use authentication, in my case authentication was not required, but if you do, add the following option to cURL:

Источник

Get curl: (56) Proxy CONNECT aborted using https example #1

I’m trying to do a simple forward HTTPS proxy, but I can’t seem to get the https example you’ve provided working. Whenever I try to curl google through the proxy, I get the curl: (56) Proxy CONNECT aborted error. I’ve tried several different proxy definition variations, but no success:

Any suggestions and/or ideas are greatly appreciated. I’m on OS X 10.10.

The text was updated successfully, but these errors were encountered:

Try passing the flag: —insecure

I think you have to import a custom CA certificate in the client to work with HTTPS.

@h2non Forgot to add that variation I’d tried. Using —insecure doesn’t work.

Are you talking about importing the certificate into the OS X keychain?

Yes, but try first forwarding to another HTTPS server, such as: https://httpbin.org

Earlier today I tried using my own self-signed cert that I’d added to the OS X keychain as I was heading down the same thought path as you, but I still saw the same error. I added it as a system root CA will full trust for all users. When I couldn’t get that to work, I went back to your example to see if it was just my configuration. Same issue. I’m running out of ideas.

I see where could be the issue, the —secure flag in balboa is not working as expected.
There’s required to pass the secure: false option to rocky , but you can’t do that from balboa currently.

Источник

Why does curl not work, but wget works?

For curl, it returns no output at all, but with wget, it returns the entire HTML source:

Here are the 2 commands. I’ve used the same user agent, and both are coming from the same IP, and are following redirects. The URL is exactly the same. For curl, it returns immediately after 1 second, so I know it’s not a timeout issue.

If NY Times might be cloaking, and not returning the source to curl, what could be different in the headers curl is sending? I assumed since the user agent is the same, the request should look exactly the same from both of these requests. What other «footprints» should I check?

2 Answers 2

The way to solve is to analyze your curl request by doing curl -v . and your wget request by doing wget -d . which shows that curl is redirected to a login page

followed by a loop of redirections (which you must have noticed, because you have already set the —max-redirs flag).

On the other hand, wget follows the same sequence except that it returns the cookie set by nytimes.com with its subsequent request(s)

The request sent by curl never includes the cookie.

The easiest way I see to modify your curl command and obtain the desired resource is by adding -c cookiefile to your curl command. This stores the cookie in the otherwise unused temporary «cookie jar» file called «cookiefile» thereby enabling curl to send the needed cookie(s) with its subsequent requests.

For example, I added the flag -c x directly after «curl » and I obtained the output just like from wget (except that wget writes it to a file and curl prints it on STDOUT).

Источник

How to fix cURL 56 recv failure connection reset by peer in CentOS?

by Ansu Anto | Apr 22, 2020

Having trouble with cURL 56 recv failure connection reset by peer in the CentOS server?

The error occurs mainly due to failure in receiving network data.

At Bobcares, we often get requests to fix cURL errors as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix this error.

Why does cURL 56 recv failure connection reset by peer occurs?

cURL error 56 is a temporary error that happens due to different reasons like, idle server connection, firewall restrictions, whitespace in the URL, etc.

For instance, the error appears as follows.

Let’s detail how our Support Engineers fix this for our customers.

How we fix this error cURL error?

At Bobcares, we have more than a decade of expertise in managing servers, we see many customers facing errors. It happens mainly when fetching package updates, installing new software, etc.

Now, let’s see the major reasons and how our Support Engineers fix this error.

Idle server connection

Recently, one of the customers approached us with a cURL error. He was getting the following error while transferring the backup to the remote destination.

So we checked the backup log files and confirmed that the backups have been generated successfully.

On further checking, we found that the server was idle while transferring the backups to the remote destination. However, the backups were successfully exported to Google drive.

In addition, to avoid this situation, the tips we follow are:

  • We always upgrade the user’s OS to avoid TCP/IP issues.
  • Also, we use the recent versions of PHP and cURL.
  • Set the Maximum Transmission Unit (MTU) or the size of packets traveling over the network to the default value, 1500 bytes.
  • We ensure that the firewall is not blocking the user’s connection.

Bad repository

Often bad repository URL can also trigger curl 56 errors.

For instance, while trying to install PHP on CentOS7 server one of our customers received the error:

Here, the customer was using an outdated repository and that caused the error. Therefore, we corrected the repo settings on the server and the package install went on fine.

Similarly, the repository may fail to load due to DNS resolution failures as well. In such scenarios, we make use of the /etc/hosts files to map the repo website to the correct IP address.

Whitespace in the URL

Another customer approached us with a similar problem.

On further investigation, we found whitespace in the URL. We then removed whitespace from the URL.

And in the PHP settings, we added the following.

In addition, If whitespace is a valid part of the URL, we use rawurlencode() function in PHP, to store the URL as encoded including whitespace.

[Need assistance in fixing cURL errors? – We can help you.]

Conclusion

In short, cURL 56 recv failure connection reset by peer in CentOS occurs when the server is idle due to running a long process or due to improper usage of URL. Today, we saw how our Support Engineers fixed the error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

I got this error because I set app up to require SSL certificate but i did not have https in the url. This blog helped me realize that right away. Thank you!

Hi,
Glad to know that our article helps you solves the issue 🙂 .

Источник

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

I have build forword proxy on my vps.

It get normal output on my terminal.

An error info occur.

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?

The text was updated successfully, but these errors were encountered:

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?

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

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

To close the firewall ,problem solved.

Ok thanks for the update.

close firewall is workless

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Источник

Hi @fiboknacky , thank you so much for your patience in this case to help me bro.
Actually, at the beginning the proxy config (in adsapi_php.ini) was commented and the original error was:
_Fatal error: Uncaught SoapFault exception: [HTTP] Could not connect to host in C:xampphtdocsGoogleAdwordsgoogleads-php-libsrcGoogleAdsApiCommonAdsSoapClient.php:98
Stack trace:
#0 C:xampphtdocsGoogleAdwordsgoogleads-php-libsrcGoogleAdsApiCommonAdsSoapClient.php(98): SoapClient->__doRequest(‘<?xml version=»…’, ‘https://adwords…’, », 1, 0)
#1 [internal function]: GoogleAdsApiCommonAdsSoapClient->__doRequest(‘<?xml version=»…’, ‘https://adwords…’, », 1, 0)
#2 C:xampphtdocsGoogleAdwordsgoogleads-php-libsrcGoogleAdsApiCommonAdsSoapClient.php(154): SoapClient->__soapCall(‘get’, Array, NULL, Array, Array)
#3 C:xampphtdocsGoogleAdwordsgoogleads-php-libsrcGoogleAdsApiAdWordsv201710cmCampaignService.php(158): GoogleAdsApiCommonAdsSoapClient->_soapCall(‘get’, Array)
#4 C:xampphtdocsGoogleAdwordsgoogleads-php-libexamplesAdWordsv201710BasicOperationsGetCampaigns.php(55): GoogleAdsApiAdWordsv201710cmCampaignService->get(Object(GoogleAdsApiAdWordsv201710cmSelector in C:xampphtdocsGoogleAdwordsgoogleads-php-libsrcGoogleAdsApiCommonAdsSoapClient.php on line 98

then I turned the proxy config on (as I read some solutions from internet) and got the error that we were talking about so far.
As the original error in this comment, do you have any idea how to fix it?

I have been trying to send curl requests with a proxy. When I send such requests with a POST method, it works fine, but it doesn’t work with GET method and I get:

CURLE_RECV_ERROR (56) — Failure when receiving data from the peer.

Any possible reason why that occurs?

The below code returns this error whereas when I execute it with another url using POST METHOD it works fine.

$handle = curl_init($url);
curl_setopt($handle, CURLOPT_POST          , 0);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_HEADER        , 1);
curl_setopt($handle, CURLOPT_MAXREDIRS     , 5);
curl_setopt($handle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($handle, CURLOPT_USERAGENT     , 'Mozilla/5.0 (Windows; U; Windows NT   5.1; en-GB; rv:1.9.1.4) Gecko/20091016 Firefox/3.5.4');
// curl_setopt($handle, CURLOPT_POSTFIELDS    , "gender=M");
curl_setopt($handle,CURLOPT_PROXY          , $proxyUrl);
curl_setopt($handle,CURLOPT_PROXYUSERPWD   , $urlProxyUserPwd);

echo curl_exec($handle);

Having trouble with cURL 56 recv failure connection reset by peer in the CentOS server?

The error occurs mainly due to failure in receiving network data.

At Bobcares, we often get requests to fix cURL errors as part of our Server Management Services.

Today, let’s get into the details on how our Support Engineers fix this error.

Why does cURL 56 recv failure connection reset by peer occurs?

cURL error 56 is a temporary error that happens due to different reasons like, idle server connection, firewall restrictions, whitespace in the URL, etc.

For instance, the error appears as follows.

cURL 56 recv failure connection reset by peer CentOS

Let’s detail how our Support Engineers fix this for our customers.

How we fix this error cURL error?

At Bobcares, we have more than a decade of expertise in managing servers, we see many customers facing errors. It happens mainly when fetching package updates, installing new software, etc.

Now, let’s see the major reasons and how our Support Engineers fix this error.

Idle server connection

Recently, one of the customers approached us with a cURL error. He was getting the following error while transferring the backup to the remote destination.

cURL error 56: TCP connection reset by peer

So we checked the backup log files and confirmed that the backups have been generated successfully.

On further checking, we found that the server was idle while transferring the backups to the remote destination. However, the backups were successfully exported to Google drive.

In addition, to avoid this situation, the tips we follow are:

  • We always upgrade the user’s OS to avoid TCP/IP issues.
  • Also, we use the recent versions of PHP and cURL.
  • Set the Maximum Transmission Unit (MTU) or the size of packets traveling over the network to the default value, 1500 bytes.
  • We ensure that the firewall is not blocking the user’s connection.

Bad repository

Often bad repository URL can also trigger curl 56 errors.

For instance, while trying to install PHP on CentOS7 server one of our customers received the error:

Loaded plugins: fastestmirror, langpacks
http://mirror.xxx.net/el7-x86_64/rpms/ ... repomd.xml: [Errno 14] curl#56 - "Recv failure: Connection reset by peer"
Trying other mirror.

Here, the customer was using an outdated repository and that caused the error. Therefore, we corrected the repo settings on the server and the package install went on fine.

Similarly, the repository may fail to load due to DNS resolution failures as well. In such scenarios, we make use of the /etc/hosts files to map the repo website to the correct IP address.

Whitespace in the URL

Another customer approached us with a similar problem.

On further investigation, we found whitespace in the URL. We then removed whitespace from the URL.

And in the PHP settings, we added the following.

curl_setopt($ch, CURLOPT_URL, trim($url));

In addition, If whitespace is a valid part of the URL, we use rawurlencode() function in PHP, to store the URL as encoded including whitespace.

[Need assistance in fixing cURL errors? – We can help you.]

Conclusion

In short, cURL 56 recv failure connection reset by peer in CentOS occurs when the server is idle due to running a long process or due to improper usage of URL. Today, we saw how our Support Engineers fixed the error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

I’m trying to build a web scraper written in PHP and while it works for most of requests, some of them fail with the following error:

cURL (56): Proxy CONNECT aborted

I’ve set my proxy provider (HTTP proxies) accordingly and since they’re mostly disposable proxies, I’d be surprised if it was a problem with the proxies itself. Also the fact that it’s displaying inconsistent behavior— it could go well on first attempt/fail on second and vice-versa, making it really hard to debug.

Unfortunately googling the question leads me to nowhere and the error message is too generic.

The cURL flags I have set are these:

    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1); 
    curl_setopt($ch, CURLOPT_PROXY, $proxy->proxy->ip);
    curl_setopt($ch, CURLOPT_PROXYPORT, $proxy->proxy->port);
    curl_setopt($ch, CURLOPT_PROXYUSERNAME, $proxy->proxy->user);
    curl_setopt($ch, CURLOPT_PROXYPASSWORD, $proxy->proxy->pass);
    curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');

Have anyone been through this?

I am using curl on Windows to download large files. However, the network connection is at times reset, and so I want to restart the download but unsure what parameters I should use.

I have tried

curl.exe —connect-timeout 240 —keepalive-time 240
—verbose —retry 50 —retry-max-time 0 —compressed -o «c:largefile.bin» -C — https://example.org/largefile.bin

but the --retry doesn’t work.

When connection is reset for some reason the --verbose shows the following:

* ...
* Closing connection 0
* schannel: shutting down SSL/TLS connection with example.org port 443
* Send failure: Connection was reset
* schannel: failed to send close msg: Failed sending data to the peer (bytes written: -1)
curl: (56) Send failure: Connection was reset

How do I get curl to retry on the curl: (56) Send failure: Connection was reset?

dirkt's user avatar

dirkt

16.2k3 gold badges30 silver badges36 bronze badges

asked May 2, 2021 at 9:58

Sha's user avatar

6

curl by default does not retry on all errors, even with --retry.

So either use --retry-all-errors (since curl 7.71.0), or use wget -c, where this works without extra options.

answered May 9, 2021 at 13:19

dirkt's user avatar

dirktdirkt

16.2k3 gold badges30 silver badges36 bronze badges

Because --retry-all-errors wasn’t supported by our version of curl on a linux-based container (error message: curl: option --retry-all-errors: is unknown), we ended up using a while loop:

while ! curl -s -f -o largefile.bin https://example.org/largefile.bin
do echo "will retry in 2 seconds"; sleep 2; done

answered Aug 1, 2022 at 9:07

Adrien Joly's user avatar

This article is designed to help you identify and resolve errors coming from a ProxyMesh proxy server. Some errors come from the proxy server, and other errors come from the remote site. You can determine the source by inspecting the response body, which appears after the numeric error code in a response. ProxyMesh error messages bodies are listed in this article, to help you distinguish and understand proxy server errors.

Error response bodies generally include both the three-digit code and any one of several reasons, or message bodies, which further define the nature of the error. This helps you find the solution in individual cases. For example, note the different solutions suggested in this article for a 402 error, depending on the accompanying message bodies:

  • 402, account is inactive
  • 402, access to PROXY-NAME proxy not authorized
Code Message Comments and Resolution
400 malformed syntax This happens if the HTTP request from the client code/library is malformed, e.g., by a syntax error or inclusion of characters that the server would not understand.
Host header missing Valid HTTP request should have a Host header.
invalid http request The server could not understand the request, usually because of invalid request message framing.
402 HTTP 402 messages mean payment required. Below, several scenarios for ProxyMesh users are described. Note: If you get too many 402 response codes from a proxy, your IP will be temporarily blocked for up to 4 hours, during which time you will get Connection Refused errors.
account is inactive Contact Support if you need access to reactivate your account or resolve payment issues.
parent account is inactive Contact Support if you need access to reactivate your account or resolve payment issues.
access to PROXY-NAME proxy not authorized Go to Edit Proxies in your account dashboard to authorize that proxy, or use a different proxy that has not sent the errors, and try again immediately.

If you receive a 402 error when you are trying to connect to a specific proxy, but are sent to a different proxy, this can mean that something is not configured correctly at your end. Please check your configurations. If you are using middleware, consider using the Scrapy default proxy configuration.

403 this host is forbidden The remote site has been blocked and can only be accessed through the Open Proxy server or the World Proxy server. As appropriate, use one of those servers.
This can happen with a request via ProxyMesh for access to a Google site or a search engine. ProxyMesh doesn’t work well for that type of request, and we recommend Trusted Proxies or Luminati instead.
407 bad password This indicates a failure of your username information or password information. You can update your password as needed on the Change your Password page of your dashboard.  The Proxy Authentication article provides details.

You might consider using IP authentication and removing the username:password authentication to prevent bad password failure due, for example, to an old password.

Basic authorization required Follow the steps in Basic access authentication to provide a user name and password when making a request.
Proxy authorization required

No IP or valid Basic Authentication header was given in the request to the proxy.

A large number of 407 request errors from one particular proxy server, while requests through other proxy servers are working correctly, may indicate a configuration issue.

  • Do you have 2 or more different scripts, and could one of them be misconfigured?
  • Has your IP changed, and have you added your IP address for authentication? If so, please make sure you are not passing in any username:password authentication headers, which are the most likely cause of the 407 responses. Use only IP authentication.
  • Please note that after you add an IP to your account, it should be authorized at the servers within a few minutes. Please be sure you do this first before you make requests from that IP to avoid a temporary block.

If your IP has changed, you can update your IPs from your account dashboard. Then our proxy server forwards your requests after removing any request headers that might compromise your privacy and anonymity.

See Proxy Authentication and Proxy Connection Problems for details.

too many failures If you get too many 407 response codes from a proxy, your IP will be temporarily blocked for up to 4 hours, during which time you will get Connection Refused errors. A 407 error indicates an authentication problem. The easiest way to fix this is to Add your IP to ProxyMesh.  
Be aware that authorizing an IP’s access to the proxy during a 4-hour ban does not immediately lift the ban. You still need to wait until the 4 hours are up.
408 request timeout You will get a 408 response code if the remote server does not respond within the proxy server’s default response timeout of 20 seconds and the target server will close down the request. If you need to wait longer for a complete response, use the X-ProxyMesh-Timeout header to specify the number of seconds you want to wait. If a significant portion of your requests are timing out ( 408 response code), it may be because the network connections between you and the proxy and/or between the proxy and the remote site are unreliable. Try some different proxies and see if that fixes the problem.
The proxy IPs may have been blocked by the remote site. If you think this is the case, then you’ll want to switch proxies, and ideally use multiple proxies to distribute your requests.
If you suspect that specific IPs are triggering the 408 error response, you can review the X-ProxyMesh-IP response header to see which IPs are being used for a request, and perhaps filter them out.
If only a small percentage of your requests are getting a 408 response code, it’s best to retry your requests up to 3 times, ideally with a short delay of at least 1 second between each retry and the next one.
Please see Proxy Server Request & Response Headers and Request Retry Strategies for detail.
500 This error can occur for a number of different reasons, with various message bodies. Retries can often resolve the problem.

Specific IPs can get blocked, especially when crawling at high volumes. One mitigation is to combine a retry strategy with custom headers, in order to control which IP addresses are not used. The way this could work is:

  • Make first request
  • Receive 500 error response code
  • Get the IP from the X-ProxyMesh-IP response header
  • Add this IP to a «not IP» list
  • Retry the request with a X-ProxyMesh-Not-IP header containing the IP
  • Receive 200 success response code

The X-ProxyMesh-Not-IP header can take a comma-separated list of IP addresses, assembling bad IPs to skip for future requests. If you use it:

  • Make sure the list is specific to the target domain.
  • Do not cache the IPs for more than 1 day, as they will be out-of-date or offline after 12 hours.
  • Remember to check the user agent in a custom header string so that it is associated with the appropriate web browser.
error connecting to proxy These errors tend to be more common for the open proxy. If you use the open proxy, we recommend implementing a good retry strategy. Please see the Open Proxy article for additional details.
error proxying data These errors tend to be more common for the open proxy. If you use the open proxy, we recommend implementing a good retry strategy. Please see the Open Proxy article for additional details.
error receiving data These errors tend to be more common for the open proxy. If you use the open proxy, we recommend implementing a good retry strategy. Please see the Open Proxy article for additional details.
error sending data These errors tend to be more common for the open proxy. If you use the open proxy, we recommend implementing a good retry strategy. Please see the Open Proxy article for additional details.
Please see Proxy Server Request & Response Headers and Request Retry Strategies for detail.
502 unknown ip address The IP requested in the X-ProxyMesh-IP request header cannot be found. This response will include X-ProxyMesh-IP as well as X-ProxyMesh-IP-Not-Found both containing the same IP as the X-ProxyMesh-IP request header. You will need to choose a different IP address for your request.

  If these headers are not present in the response, then this response came from the remote site, not the proxy server.

503 Several different situations can generate a 503 error, and each situation produces a different response message body. All of these situations are temporary, generally lasting a few minutes at most. Retry after a pause.

Any response body for 503 other than the ones below likely indicates a rate limit response from the remote site. If this happens regularly, try using a different proxy server, or slowing down your crawl. Please see Non-Standard Error Messages for more details.

error connecting to proxy These errors tend to be more common for the open proxy. If you use the open proxy, we recommend implementing a good retry strategy. Please see the Open Proxy article for additional details.
service unavailable The proxy server cannot handle requests right now. This is rare, but can happen under high load situations. See High-Traffic Proxy Connections.
no available IP addresses You have excluded all available IPs in the X-ProxyMesh-Not-IP request header. Wait until the IPs rotate, or reduce the number of excluded IPs.
no proxies available There are no outgoing IPs available. If you get the 503 response when using the X-ProxyMesh-Country header, then you have chosen a country value with no IPs. The open and world proxies have IPs in multiple countries. Use the X-ProxyMesh-Country header to restrict the IP choices to a specific country. The value of the header should be a 2 character ISO country code, such as US or RU. Check the status page for each proxy to see what country codes and how many IPs are currently available. Otherwise, this response is due to an error in the IP rotation. This is rare, likely due to an issue with the hosting provider, and will generally be fixed within 1 hour. Try again in a few minutes.
proxy error The proxy server cannot connect to an outgoing IP. This happens more often with the open proxy server, due to the unreliability of the open proxies. Retry after a short delay.
server error Something went wrong in the proxy server while trying to authenticate. This is very rare. Retry after a short delay.
too many errors Your requests have generated more than 60 response errors (with a status code of 400 or greater) over the past 30 seconds. You need to fix what you’re doing to stop producing so many errors. For example, if you are submitting request to Google and they bring repeated error responses, be aware that ProxyMesh doesn’t work well for requests to Google. We recommend trustedproxies.com or Luminati instead. A remote site may regularly send a 503 response indicating rate limits. Try using a different proxy server or slowing down your crawl.
too many connections

On the proxy server, having more than 100 connections from a single IP address would constitute an undue load. You will then receive this error. It is much better and more efficient to use a shared connection or connection pool for proxy connections. You can also access the proxy server from multiple IP addresses.

Any response body for 503, other than those above, likely comes from the remote site. For those cases, please see Request Retry Strategy and Non-Standard Error Messages.

504 gateway timeout Timeout connecting to proxy. This usually means that the outgoing proxy server is down. This error tends to be more common for the open proxy. If you use the open proxy, we recommend implementing a good retry strategy. Please see the Open Proxy article for additional details.
509 bandwidth limit exceeded You have exceeded your bandwidth limit. This response will continue until your next bill has been processed, or you raise the limit. Please see Bandwidth Limits for full details.

Client-Side Message: cURL Error 56

On occasion, especially while running a high-traffic proxy connection, you may see a response message from an additional source, namely the cURL command-line tool for data transfer using various protocols. A message example is described below.

Code Message Comments and Resolution
56 Proxy CONNECT aborted due to timeout This does not necessarily indicate a true outage on the proxy. There could have been network issues in between, or perhaps some of the outgoing IPs were temporarily blocked by the remote site. To reduce the impact of timeout errors, try these steps:

  1. Upgrade your plan and distribute your requests across multiple proxies.
  2. Implement a retry strategy in your app, so that when a timeout occurs, you try a different proxy, and/or wait 1 second before retrying.

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Curl error 35 что это
  • Curl error 35 медиа гет
  • Curl error 35 ssl connect error
  • Curl error 35 encountered end of file
  • Curl error 3 url malformed

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии