--- title: "ERR_CONNECTION_REFUSED: What It Means and How to Fix It" description: "ERR_CONNECTION_REFUSED means the server was reached but nothing accepted the connection on that port. Causes and fixes for visitors and site owners." url: https://uptrack.app/errors/err-connection-refused --- ERR\_CONNECTION\_REFUSED

# ERR\_CONNECTION\_REFUSED: what it means and how to fix it

ERR\_CONNECTION\_REFUSED means your browser reached the server’s address, and the server answered that it will not accept the connection on that port. Usually no program is listening on the port, or a firewall rule rejects the connection. You may also see - “refused to connect” (Chrome) - “Unable to connect” (Firefox) - “Safari can’t connect to the server” (Safari) ## Common causes 1. 1 The web server or the application is not running. It stopped, it crashed, or a deploy did not start it again. 2. 2 The port is wrong. The site runs on another port than the one in the address. 3. 3 A firewall or a cloud security group rejects the connection. 4. 4 The program listens only on 127.0.0.1, so it accepts connections from the same machine only. 5. 5 The domain still points to an old server that has no web server any more. ## If you are visiting the site: how to fix it 1. 1 Reload after a minute. A site that is restarting is often back soon. 2. 2 Check the address and the port number. 3. 3 Try another network and another device, to see if only your connection is refused. 4. 4 Turn off a proxy or VPN, and check that the hosts file has no line for this site. ## If you run the site: what to check 1. 1 Check that the service is running, for example with systemctl status on Linux, and read its log for a crash. 2. 2 Check which ports listen and on which address. On Linux, ss -ltnp shows them. A service on 127.0.0.1 is not reachable from outside. 3. 3 Check the firewall and the cloud security group. A reject rule gives a refused connection; a drop rule gives a timeout instead. 4. 4 Check that the DNS record of the site points to the right server. 5. 5 If a reverse proxy sits in front, check that the proxy itself is running and listens on the port. ## Check it with free tools - [Is a website down?Check the site from several locations.](https://uptrack.app/tools/is-website-down) - [DNS lookupCheck that the name points to the right IP address.](https://uptrack.app/tools/dns-lookup) ## Frequently asked questions What does ERR\_CONNECTION\_REFUSED mean? The browser reached the server’s address, but the server did not accept the connection on that port. It usually means that no program listens on the port, or that a firewall rejects the connection. What is the difference between ERR\_CONNECTION\_REFUSED and ERR\_CONNECTION\_TIMED\_OUT? With a refused connection the other side answers at once that it will not accept the connection. With a timeout nothing answers at all, which often means that a firewall silently drops the packets or that the server is unreachable. Why do I get ERR\_CONNECTION\_REFUSED on localhost? No program listens on that port on your machine. Start your development server, and check the port number in the address and in the server’s settings. How do I fix ERR\_CONNECTION\_REFUSED on my server? Check that the service runs, that it listens on the right port and on an address that outside machines can reach, and that the firewall and the security group allow the port. Then check that the DNS record points to this server. ## Know about it before your visitors do Uptrack checks your site on a schedule from several locations and alerts you when it stops answering, so you hear about it from an alert and not from a customer. [See plans](https://uptrack.app/pricing) from $3/mo · 30-day money-back guarantee ## Other browser and DNS errors - [DNS\_PROBE\_FINISHED\_NXDOMAIN](https://uptrack.app/errors/dns-probe-finished-nxdomain) - [ERR\_NAME\_NOT\_RESOLVED](https://uptrack.app/errors/err-name-not-resolved) - [DNS server not responding](https://uptrack.app/errors/dns-server-not-responding) - [ERR\_CONNECTION\_RESET](https://uptrack.app/errors/err-connection-reset) - [ERR\_CONNECTION\_CLOSED](https://uptrack.app/errors/err-connection-closed) - [ERR\_SSL\_PROTOCOL\_ERROR](https://uptrack.app/errors/err-ssl-protocol-error) - [NET::ERR\_CERT\_AUTHORITY\_INVALID](https://uptrack.app/errors/your-connection-is-not-private)