Proxy connection failed
Your side: the address Chrome was given, or the network between you and it. The site was never contacted and your credentials were never checked.
- Usually from
- The proxy address, or a proxy setting you forgot
- Try first
- Check which proxy Chrome is using, then test it with curl
What a failed proxy connection means through a proxy
Chromium files this as net error -130: it could not create a connection to the proxy server, because the name did not resolve or the socket did not connect. Its own source notes that the error does not cover the CONNECT step. A proxy that answered and then refused the tunnel is ERR_TUNNEL_CONNECTION_FAILED instead.
Chrome takes its proxy from the operating system unless something overrides it: a --proxy-server flag, a policy, or an extension that controls proxy settings. Uninstalling a VPN or proxy app does not always switch the system setting back off, and Chrome keeps pointing at an address where nothing listens any more.
In automation the same error comes from the server you give Playwright, Puppeteer or Selenium. Chrome’s error page sums it up as “There is something wrong with the proxy server, or the address is incorrect.” That is exactly the question to answer.
Your credentials, the proxy, or the target?
Your side: the address Chrome was given, or the network between you and it. The site was never contacted and your credentials were never checked.
Your credentials
Not the cause. Credentials come into it only after the proxy accepts the connection, and a wrong password gets a login prompt or a tunnel failure instead.
The proxy
Only if the address is right and the proxy itself is unreachable. If curl reaches the same host and port from the same machine, the proxy is up and the browser setup is the problem.
The target site
Not involved. Chrome never got as far as asking the proxy for the site.
How to tell
- Every site fails, including ones you never meant to proxy: a system-wide or extension proxy setting, not a per-script one.
- A log recorded at
chrome://net-exportand opened in the NetLog viewer shows, on its Proxy tab, the proxy settings Chrome actually used, whatever the flags and settings pages say. - curl to the same host and port from the same machine fails too: the address or your network is the problem, not the browser.
- Playwright prints
net::ERR_PROXY_CONNECTION_FAILEDongotoin Chromium. Firefox reports a proxy that refused the connection asNS_ERROR_PROXY_CONNECTION_REFUSED.
Fixes, in the order to try them
- Costs nothing
Check which proxy Chrome is using
Record a short log at
chrome://net-exportwhile the error happens, then open the file at netlog-viewer.appspot.com and read the effective settings on its Proxy tab.chrome://settings/?search=proxysays whether an extension or a policy controls the proxy. If a proxy is in use that you did not set, find out where it came from before changing anything else. - Costs nothing
Turn off a leftover system proxy
On Windows: Settings, Network & internet, Proxy. On macOS: System Settings, Network, your connection, Details, Proxies. Switch off any manual proxy or setup script left by an app you removed, then restart Chrome.
- Costs nothing
Disable proxy extensions one at a time
An extension that manages proxies overrides the system setting. Disable it in
chrome://extensionsand reload. If the page loads, fix the address inside that extension. - Costs nothing
Compare host and port with the dashboard
Character by character, in the
serverstring, the--proxy-serverflag or the extension profile. The residential gateway and each rented IP have their own host and port, and an ISP or datacenter address is only yours while its order is active. - Costs some time
Check the network between you and the proxy
Company networks, hotel Wi-Fi and some hosting providers block outbound connections to proxy ports. If curl fails from the same machine too, ask whoever runs that network, or test from another one.
See the real status and headers
Each sample tries to reach the proxy address and nothing more, so a failure here is about the address or the network, never the site.
curl
# the proxy this shell would use without being told
env | grep -i _proxy
# can this machine reach the gateway at all?
nc -vz resi.proxymonkey.io 8000
curl -sv -o /dev/null -x http://USER:[email protected]:8000 https://httpbin.org/ip 2>&1 | grep -iE 'trying|connected|failed'
# curl: (7) Failed to connect to ... the failure Chrome reports as -130Python Requests
import requests
from requests.utils import get_environ_proxies
URL = "https://httpbin.org/ip"
PROXY = "http://USER:[email protected]:8000"
print("proxies from the environment:", sorted(get_environ_proxies(URL)))
with requests.Session() as http:
http.trust_env = False
try:
r = http.get(URL, proxies={"http": PROXY, "https": PROXY}, timeout=15)
print("reached the proxy and the site:", r.status_code)
except requests.exceptions.ProxyError as err:
print("could not reach the proxy:", err)A leftover HTTPS_PROXY sends Python to a dead proxy the way a leftover system setting sends Chrome. On Windows and macOS Requests also reads the system proxy settings. trust_env = False makes it use only the proxy you pass.
Scrapy
import os
from urllib.parse import urlsplit
from scrapy.exceptions import CannotResolveHostError, DownloadConnectionRefusedError
from twisted.internet.error import ConnectError
async def start(self):
self.logger.info("proxy variables set: %s", sorted(k for k in os.environ if k.lower().endswith("_proxy")))
for url in self.start_urls:
yield scrapy.Request(url, errback=self.on_error)
def on_error(self, failure):
if failure.check(CannotResolveHostError, DownloadConnectionRefusedError, ConnectError):
proxy = urlsplit(failure.request.meta.get("proxy") or "")
self.logger.error("never reached the proxy at %s:%s: %r", proxy.hostname, proxy.port, failure.value)Scrapy’s HttpProxyMiddleware picks up http_proxy and https_proxy from the environment, so a stale variable can send a spider to a proxy you forgot about. The log line names the variables, not their values.
Playwright
from playwright.sync_api import Error, sync_playwright
PROXY = {"server": "http://resi.proxymonkey.io:8000", "username": "USER", "password": "PASS"}
with sync_playwright() as p:
browser = p.chromium.launch(proxy=PROXY)
page = browser.new_page()
try:
page.goto("https://httpbin.org/ip", timeout=20_000)
print(page.inner_text("body"))
except Error as err:
if "ERR_PROXY_CONNECTION_FAILED" in err.message:
print("Chromium never reached", PROXY["server"])
else:
raise
browser.close()
# Firefox: NS_ERROR_PROXY_CONNECTION_REFUSED, or NS_ERROR_UNKNOWN_PROXY_HOST if the name does not resolveKeep server to scheme, host and port. A typo there fails the same way whatever credentials you pass.
Node.js
import { fetch, ProxyAgent } from "undici";
const dispatcher = new ProxyAgent("http://USER:[email protected]:8000");
const codes = (err) => {
const seen = [];
for (let e = err; e; e = e.cause) if (e.code) seen.push(e.code);
return seen;
};
try {
await fetch("https://httpbin.org/ip", { dispatcher });
} catch (err) {
console.error(codes(err).join(" <- ") || err.message);
}
// ECONNREFUSED nothing is listening at that host and port
// ENOTFOUND the proxy's hostname does not resolveRecent undici releases can wrap the socket error one level deeper, so the loop walks the whole cause chain.
The samples use the residential gateway, resi.proxymonkey.io:8000. For an ISP or datacenter IP, use USER:PASS@IP:PORT for the address you rented. Your dashboard lists the host and port for every order, and where it differs from this page, the dashboard is right.
Will a different proxy line fix it?
When switching helps
No line fixes this. Chrome did not reach any proxy, so the kind of proxy at the address makes no difference.
When it will not
A new order behind the same wrong address, firewall or leftover setting fails the same way. Get curl through to the gateway first.
Is a failed request billed?
We bill for request bytes and response bytes, including headers and protocol overhead on the tunnelled connection. Connections that fail before transferring data are not billed. Retries that you initiate are billed and appear as separate entries in your usage log.
The terms say connections that fail before transferring data are not billed. Chrome never reached the proxy, so nothing went through it. If your usage log shows rows at the time of these errors, look at what else was using the same credentials.
Residential is billed per GB of that traffic. ISP and datacenter addresses are charged per IP for their term, and where a plan includes a traffic allowance, traffic past it is billed per GB under the same rule. The usage log in your dashboard has one row per request with bytes in, bytes out and cost, so you can look up the failed request yourself.
Questions people ask about a failed proxy connection
Why does every site show ERR_PROXY_CONNECTION_FAILED?
Because Chrome is sending all traffic to a proxy it cannot reach. That is usually a system proxy setting or an extension, often left behind by a VPN or proxy app you removed. Turn it off, or fix the address, and every site comes back.
Is ERR_PROXY_CONNECTION_FAILED the same as ERR_TUNNEL_CONNECTION_FAILED?
No. PROXY_CONNECTION_FAILED means Chrome never connected to the proxy. TUNNEL_CONNECTION_FAILED means it connected and the proxy refused to open the tunnel, which points at credentials, the port or the proxy’s path to the site.
Can a wrong password cause ERR_PROXY_CONNECTION_FAILED?
No. This error means the connection to the proxy never opened, and credentials are only checked once it has. A wrong password shows up as a login prompt, a 407 or a tunnel failure.
How do I fix it after uninstalling a VPN?
Open the proxy section of your system network settings and switch off any manual proxy or setup script the VPN left behind. Then check chrome://extensions for a proxy extension, restart Chrome and try again.
Errors that travel with this one
- TUNNEL_CONNECTION_FAILED
Tunnel connection failed
The proxy answered, but not with the 200 that opens a tunnel. Chromium hides its reason; curl shows it.
Work it out → - ECONNREFUSED
Connection refused
Something said no before any HTTP happened. Usually the host or port you gave for the proxy.
Work it out → - TIMEOUT
Connection timeout
Nothing came back in time. Find out which leg stalled before you raise the limit.
Work it out →
Still stuck on a failed proxy connection?
Paste your error in the Discord: the full message plus the command or the few lines that set up the proxy, with the password taken out. Someone there has seen it before.
Join the Discord4,200+monkeys in the Discord
Help from humans
Post your error, get an answer. Usually in minutes, usually from someone who has hit the same wall.
A status bot that tells on us
Pool health, incidents and maintenance posted automatically. Including the bad days.
Deals and free traffic
Bonus GB drops, early access to new pools, and the occasional giveaway for a good bug report.