Error codes
What proxy errors mean and how to fix them: status codes from the gateway and from websites, and the exact messages of curl, Python, Node.js and browsers.
When a request through a proxy fails, the error can come from three places: your client, the NyxonProxies gateway, or the website. Telling them apart is most of the fix. This page lists the common codes and messages with what to do about each.
Gateway or website
For an https:// site, your client first asks the gateway to open a tunnel (the CONNECT request), and only then talks to the website through it.
- An error on the tunnel comes from the gateway: it refused the credentials or could not reach the site. Clients report it as a tunnel or proxy error, for example
CONNECT tunnel failed, response 407. - A status code on the page itself, such as a
403or a429you receive as the response, comes from the website. The proxy worked, and the site decided how to answer.
For plain http:// sites there is no tunnel, so the gateway's codes and the site's codes arrive the same way. A 407 is always the gateway.
Gateway status codes
| Code | Meaning | What to do |
|---|---|---|
407 Proxy Authentication Required | The gateway did not accept the username or password. | Check the credentials, the host for the product, special characters in the password and the plan status. See Authentication. |
5xx on the tunnel, such as 502 or 504 | The gateway could not open the connection to the site through an exit, or it took too long. | Retry. If it repeats, check that the site is up, try a wider location, and look at Troubleshooting. |
Website status codes
These come from the site you are visiting, through the proxy:
| Code | Usual meaning | What to do |
|---|---|---|
403 Forbidden | The site blocked this request, often because it flagged the IP type or the client. | Use a stronger IP type (Datacenter to ISP to Residential to Mobile), send realistic headers, or use a real browser. |
429 Too Many Requests | Too many requests from one IP or one session. | Slow down, rotate more often, or spread the load over more sticky sessions. |
503 with a challenge page | A bot protection service wants a browser check. | Use a headless browser, keep cookies in a sticky session, or reduce the rate. |
401 Unauthorized | The site needs you to sign in. This is not a proxy error. | Check the login on the site itself. |
A CAPTCHA page with status 200 is also the site's answer, not a proxy error.
curl
| Message | Cause |
|---|---|
curl: (56) CONNECT tunnel failed, response 407 | Wrong or missing credentials, or credentials for another product. |
curl: (97) User was rejected by the SOCKS5 server (1 1). | Wrong credentials on the SOCKS5 port. |
curl: (97) Failed to receive SOCKS response, proxy closed connection | A socks5:// URL on an HTTP-only port, such as 8080 on Residential. Use the SOCKS5 port. |
curl: (56) Proxy CONNECT aborted | An http:// URL on a SOCKS5-only port, such as 1080. Use the HTTP port. |
curl: (35) followed by an SSL or TLS error | The proxy URL starts with https://. Change it to http://. |
curl: (7) Failed to connect ... Could not connect to server | The gateway port could not be reached: a wrong port or a firewall. |
curl: (5) Could not resolve proxy | A typo in the gateway hostname. |
curl: (28) ... timed out | The connection or the request took too long. Check the firewall, then retry. |
Python
With Requests, the error is wrapped in a longer message. Look for the part in parentheses:
| Message contains | Cause |
|---|---|
ProxyError('Unable to connect to proxy', OSError('Tunnel connection failed: 407 Proxy Authentication Required')) | Wrong or missing credentials. |
SOCKS5 authentication failed | Wrong credentials on the SOCKS5 port. |
Your proxy appears to only use HTTP and not HTTPS, try changing your proxy URL to be HTTP | The proxy URL starts with https://. Use http://. |
Missing dependencies for SOCKS support | SOCKS support is not installed. Run pip install "requests[socks]". |
Node.js
- axios reports
Request failed with status code 407for wrong credentials. - undici reports
fetch failed. Thecauseproperty of the error holds the details.
Check the credentials first, then the host and port. The Node.js guide shows working setups for both.
Browsers
| Error | Cause |
|---|---|
ERR_PROXY_CONNECTION_FAILED (Chrome, Edge) | The browser cannot reach the gateway: a wrong host or port, or a firewall. |
ERR_INVALID_AUTH_CREDENTIALS (Chrome, Edge) | The gateway asked for credentials and none were sent. |
ERR_TOO_MANY_RETRIES or ERR_HTTP_RESPONSE_CODE_FAILURE (Chrome, Edge) | Credentials were sent and refused, usually a wrong password. |
ERR_TUNNEL_CONNECTION_FAILED (Chrome, Edge) | The gateway answered the tunnel request with an error status, such as 502 when it could not reach the site. |
ERR_SOCKS_CONNECTION_FAILED (Chrome, Edge) | The SOCKS5 connection failed. Chrome cannot send SOCKS5 passwords, so use the HTTP port. |
ERR_NO_SUPPORTED_PROXIES (Chrome, Edge) | The proxy address is in a form Chrome does not accept, such as one with the username and password inside it. |
| The proxy server is refusing connections (Firefox) | Firefox cannot connect to the gateway: check the host, the port and the firewall. |
| Unable to find the proxy server (Firefox) | A typo in the gateway hostname. |
A browser that keeps asking for the proxy username and password is receiving 407. The credentials it sends are wrong, or it is sending credentials saved for another plan.
Still stuck
Run the same proxy line in curl. If curl works, the problem is in the tool's settings. If curl fails, the message above tells you where to look. Live chat can also check a plan for you: send the plan ID, never the password.
Last updated
Still stuck?
People answer the live chat around the clock. Send the proxy line you used (without the password) and the error you see.