Connection Refused
DownBad reached your server, but the server turned the connection away, because nothing on it is taking connections where DownBad knocked. Usually a program has stopped. This page helps you find out which one, start it again, and see the incident close.
What you’re seeing
Section titled “What you’re seeing”An incident is open for a URL, port or SSL monitor, and it shows one of these reasons:
Connection refused: connect ECONNREFUSED 203.0.113.10:443, on a URL monitor, with the failure type network.Connection refused: Unknown error occurred, on a URL monitor, with the failure type network. This one names nothing specific, but it means the same as the one above. You see it when your address has both an IPv4 and an IPv6 address (the older and the newer kind of internet address), DownBad tried both, and both refused.Port connection refused: Port 8080 is not listening on example.com, on a port monitor, with the failure type connection refused.SSL connection refused: Operation failed after 4 attempts. Last error: connect ECONNREFUSED 203.0.113.10:443, on an SSL monitor, with the failure type network. An SSL monitor tries more than once before it gives up, and the reason says how many times.SSL connection refused: Operation failed after 4 attempts. Last error: AggregateError, on an SSL monitor, with the failure type network. It means the same as the one above, for an address with both an IPv4 and an IPv6 address.
A server offers each of its services behind a numbered port: 443 for secure
web pages (https://), 80 for plain ones (http://), and other numbers for
anything else. A program that offers a service is listening on its port,
waiting for connections.
Refused means DownBad reached your server, and the server answered straight
away that nothing is listening on that port. ECONNREFUSED is the error code
for exactly that, and the address after it is the server and port DownBad
tried. A refusal is different from a timeout: refused means something answered
“no one’s here”, while timed out means nothing answered at all.
Is it you or us?
Section titled “Is it you or us?”It is almost always your server. A refusal is an answer that comes back from the address your monitor points at.
DownBad didn’t open this incident on one check, either. When a check is refused, DownBad first checks again from up to three other places in the United States, and opens the incident only when at least half of the places that answered failed too.
The trap is testing from the wrong place. A program that listens only for the server itself answers when you try from the server, and refuses everyone else. So check from outside:
-
For a URL monitor, turn off Wi-Fi on your phone and open the address over mobile data. Chrome and Edge show
ERR_CONNECTION_REFUSEDwhen the connection is refused. -
For any monitor, run a free check from other countries at check-host.net. Enter your host name and port, such as
example.com:443. Each location’s result saysConnection refusedwhen the port refuses. -
Read the results:
- Refused from outside: your server really is turning connections away. Carry on below.
- It works from everywhere: the problem has gone. Skip to Confirm DownBad sees the fix.
Check it yourself
Section titled “Check it yourself”These commands try to connect the way DownBad does. Run the first three from a
computer outside your server’s own network, such as your laptop, not from the
server. Put your own host name in place of example.com.
1. Find the port DownBad connects to. It depends on the kind of monitor:
- Port monitor: its Port Number setting.
- SSL monitor: its Port setting, which is 443 unless you changed it.
- URL monitor: the number after the colon in its URL, if there is one,
so
https://example.com:8443/uses 8443. Otherwise 443 for an address that starts withhttps://, and 80 forhttp://.
The commands below use 443. Put your monitor’s port in its place.
2. Try to connect to the port:
nc -vz -G 5 example.com 443Connection to example.com port 443 [tcp/https] succeeded!No public address refused from the network these examples came from, so this refusal is from a closed port on the Mac itself, 127.0.0.1 port 8443:
nc: connectx to 127.0.0.1 port 8443 (tcp) failed: Connection refusednc -vz -w 5 example.com 443Connection to example.com (104.20.23.154) 443 port [tcp/https] succeeded!nc: connect to example.com (203.0.113.10) port 443 (tcp) failed: Connection refusedTest-NetConnection example.com -Port 443 -InformationLevel DetailedTcpTestSucceeded : TrueMicrosoft doesn’t publish what this prints when the connection fails. Its
Remote Desktop troubleshooting guide
says TcpTestSucceeded reads False then, so look for that line.
If it says timed out instead of Connection refused, nothing answered at all.
That is a different problem from the one on this page: something is dropping
the connection, or the server itself is down. On Windows, check-host.net (above)
shows which of the two happened.
3. If it’s a URL monitor, ask for the page. This follows redirects (a page sending the visitor on to another address), as DownBad’s check does unless the monitor says otherwise:
curl -sS -L -o /dev/null -w "%{http_code}\n" https://example.com/200As in step 2, this refusal is from a closed port on the Mac itself:
curl: (7) Failed to connect to 127.0.0.1 port 8089 after 0 ms: Couldn't connect to server000curl -sS -L -o /dev/null -w "%{http_code}\n" https://example.com/200curl: (7) Failed to connect to example.com port 443 after 15 ms: Couldn't connect to server000curl.exe -sS -L -o NUL -w "%{http_code}\n" https://example.com/Neither Microsoft nor curl publishes what this prints on Windows, so there
is no example here. It is the same curl as on the other systems: look for
a status code such as 200 when it works, and for an error followed by
000 when nothing answered.
(7) is curl’s code for a connection it couldn’t open, and 000 means no
answer came back at all.
4. On the server, list what is listening. Log in to the server and run the command for the server’s system, which may not be the same as your own computer’s. It only reads:
netstat -an -p tcp | grep LISTENtcp46 0 0 *.443 *.* LISTENtcp4 0 0 127.0.0.1.6443 *.* LISTENss -ltnState Recv-Q Send-Q Local Address:Port Peer Address:PortProcessLISTEN 0 5 0.0.0.0:443 0.0.0.0:*State Recv-Q Send-Q Local Address:Port Peer Address:PortProcessLISTEN 0 5 127.0.0.1:6443 0.0.0.0:*netstat -ano | findstr LISTENING TCP 0.0.0.0:3389 0.0.0.0:0 LISTENING 820 TCP [::]:3389 [::]:0 LISTENING 820Microsoft doesn’t publish what this prints for a program that listens only
for the server itself. Its line starts with 127.0.0.1: or [::1]:
instead of 0.0.0.0: or [::]:.
The macOS and Linux examples show one program listening on port 443 for everyone and another listening on port 6443 for the server alone. Microsoft’s Windows example shows one listening on port 3389 for everyone. How to read your own list:
- Find your port at the end of an address, after the last
:or.. - Your port isn’t in the list: nothing is listening on it. Go to the first cause.
- Your port is there after
0.0.0.0,*,::or[::]: a program is listening for everyone, so something else is doing the refusing. Go to the monitor’s settings, and then to the firewall: the firewall is the software that decides which connections get through. - Your port is there only after
127.0.0.1,::1or[::1]: that is localhost, an address only the server itself can reach. Go to the localhost cause.
Without a terminal: check-host.net runs
step 2 from many countries, and its
HTTP check runs step 3. Both say
Connection refused when the connection is refused, and
Connection timed out when nothing answered.
Fix it
Section titled “Fix it”The causes below run from most to least likely, so start with the first. If this monitor has never passed since you added it, the monitor’s settings and localhost are more likely than a program that stopped.
Most steps happen on the server itself, so you need to log in to it: with
SSH (a way to open a terminal on another computer), or through the console
in your hosting provider’s dashboard. A step that changes the server needs
sudo on Linux, which runs a command as the server’s administrator and
asks for your password, or on Windows a PowerShell window opened with Run as
Administrator. Each such step says so.
If someone else runs the server for you, such as a managed hosting company or a website builder, send them the reason the incident shows and a link to this page. The fix is theirs to make.
The program stopped or crashed
Section titled “The program stopped or crashed”This is the usual cause when the monitor used to pass. The program that answers on the port has stopped: a web server such as nginx, Apache or IIS (Microsoft’s web server), or your own app. You can tell because the server’s list of listening ports, from step 4 of Check it yourself, doesn’t include the monitor’s port.
- Check the program’s state. On Linux, most programs run as a service, a
program the system starts and watches for you. Put your program’s service
name in place of
nginx:apache2orhttpdfor Apache, or your app’s own name. On Windows, IIS runs as the service namedW3SVC.
A Mac serving a website usually runs the program by hand, not as a service. If its port isn’t in the list from step 4 of Check it yourself, it has stopped.
systemctl status nginxWhen the program is running, its Active: line says active (running), as
the systemctl manual
shows. When it isn’t:
○ nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled) Active: inactive (dead) since Tue 2026-09-29 17:01:35 UTC; 4ms ago× nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; preset: enabled) Active: failed (Result: exit-code) since Tue 2026-09-29 17:01:41 UTC; 4ms agoSep 29 17:01:41 fbbc75957a0e nginx[161]: 2026/09/29 17:01:41 [emerg] 161#161: unknown directive "lisen" in /etc/nginx/sites-enabled/default:23Unit nginx.service could not be found.Get-Service W3SVCStatus Name DisplayName------ ---- -----------Running Spooler Print SpoolerStatus Name DisplayName------ ---- -----------Stopped stisvc Windows Image Acquisition (WIA)An app run by pm2 (a program that keeps Node.js apps running) or in a
Docker container (a sealed-off package holding a program and everything it
needs) is checked the same way on every system. Put your app’s or container’s
name in place of web.
pm2 list│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching ││ 0 │ web │ default │ N/A │ fork │ 7484 │ 1s │ 0 │ online │ 0% │ 55.3mb │ deploy │ disabled ││ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching ││ 0 │ web │ default │ N/A │ fork │ 0 │ 0 │ 1 │ stopped │ 0% │ 0b │ deploy │ disabled │docker ps -aCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESaf80e2296064 nginx:stable "/docker-entrypoint.…" 2 seconds ago Up 2 seconds 80/tcp webCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESaf80e2296064 nginx:stable "/docker-entrypoint.…" 2 seconds ago Exited (0) Less than a second ago web-
If it crashed, find out why before you start it again, or it will stop again. On Linux, the last lines the program wrote are at the bottom of the
systemctl statusoutput, as in the crashed example above: nginx names the mistake,unknown directive "lisen", and the file and line it is on. If the bottom of the output says that some journal files were not opened due to insufficient permissions, run the same command withsudo. A mistake in a settings file you just changed and a full disk are common culprits. -
Start it again. This changes the server, so it needs
sudoon Linux, and a PowerShell window opened with Run as Administrator on Windows.
Start the program again the same way you started it before. A program started by hand in a terminal usually stops when that terminal closes, so to keep it running, run it under pm2 or in a Docker container.
sudo systemctl restart nginxIt prints nothing when it works. Run systemctl status nginx again to see
active (running).
Job for nginx.service failed because the control process exited with error code.See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.Start-Service W3SVCIt prints nothing when it works: Microsoft’s
reference
says Start-Service doesn’t produce any output unless you ask for it.
Start-Service : Service 'Telnet (TlntSvr)' cannot be started due to the following error: Cannotstart service TlntSvr on computer '.'.For pm2 or Docker, on any system:
pm2 restart web[PM2] Applying action restartProcessId on app [web](ids: [ 0 ])[PM2] [web](0) ✓Use --update-env to update environment variables[PM2][ERROR] Process or Namespace web not founddocker start webwebError response from daemon: No such container: webfailed to start containers: webMore in the guides for systemctl, nginx, Apache and pm2.
- Run step 4 of Check it yourself again. The monitor’s port should now be in the list.
The server restarted, and the program didn’t start with it
Section titled “The server restarted, and the program didn’t start with it”This is the likely cause when the program was running before, the server restarted, such as for an update or your provider’s maintenance, and the program is stopped now. A program only comes back after a restart if it is set to start when the server does.
- Check whether it is set to start with the server. Put your program’s service
name in place of
nginx, or your container’s name in place ofweb.
A program you start by hand on a Mac never starts with it. Run it under pm2 or in a Docker container instead, and set that up as below.
systemctl is-enabled nginxenableddisabledGet-Service W3SVC | Select-Object -Property Name, StartType, StatusName StartType Status---- --------- ------BITS Automatic RunningMicrosoft doesn’t publish what this prints for a service that doesn’t start
with the server. Its StartType then reads Manual or Disabled
instead of Automatic.
For a Docker container, on any system:
docker inspect --format '{{.HostConfig.RestartPolicy.Name}}' webunless-stoppednoAn app run by pm2 only comes back after a restart once pm2 itself is set to start with the server, as pm2’s startup guide explains.
- Set it to start with the server, and start it now. This changes the server,
so it needs
sudoon Linux, and a PowerShell window opened with Run as Administrator on Windows.
Run the program under pm2 or in a Docker container, as below, so it comes back by itself.
sudo systemctl enable --now nginxSynchronizing state of nginx.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.Executing: /usr/lib/systemd/systemd-sysv-install enable nginxCreated symlink /etc/systemd/system/multi-user.target.wants/nginx.service → /usr/lib/systemd/system/nginx.service.Failed to enable unit: Unit file nginx.service does not exist.Set-Service -Name W3SVC -StartupType AutomaticIt prints nothing when it works: Microsoft’s
reference
says Set-Service returns no output unless you ask for it. Microsoft
doesn’t publish what it prints when it fails. Then start the service:
Start-Service W3SVCIt prints nothing when it works: Microsoft’s reference says Start-Service
doesn’t produce any output unless you ask for it.
Start-Service : Service 'Telnet (TlntSvr)' cannot be started due to the following error: Cannotstart service TlntSvr on computer '.'.For a Docker container, on any system, set it to come back by itself (Docker’s guide), then start it:
docker update --restart unless-stopped webwebError response from daemon: No such container: webdocker start webwebError response from daemon: No such container: webfailed to start containers: webFor pm2, follow pm2’s startup guide. More on systemd is in the systemctl guide.
- Run step 4 of Check it yourself again. The monitor’s port should now be in the list.
It listens only on localhost, or on another port
Section titled “It listens only on localhost, or on another port”This is the likely cause when the program is running, but the server’s list
from step 4 of Check it yourself shows it at a different
port from the monitor’s, or only after 127.0.0.1, ::1 or [::1]. That
address is localhost: only the server itself can reach it, so the program
answers there and refuses everyone else.
-
Decide whether the program is meant to be reached from outside. An app behind nginx or Apache is often meant to listen on localhost only, while the web server takes the public connections and passes them on. If that is your set-up, leave the app alone and check that the monitor points at the web server’s port.
-
Otherwise, find the setting that chooses the program’s address and port, and make it listen on every address, at the port the monitor uses:
- nginx: a
listenline such aslisten 443 ssl;listens on every address. One with127.0.0.1:before the port listens on localhost only (nginx’s guide). - Apache:
Listen 80listens on every address, andListen 127.0.0.1:80on localhost only (Apache’s guide). - IIS: check the site’s Bindings in IIS Manager (Microsoft’s guide).
- A Node.js app: the host it passes to
listen. Leave the host out, or use0.0.0.0, to listen on every address (Node.js’s guide). - A Docker container: its ports are set when it is created. The
PORTS column of
docker psshows0.0.0.0:8080->80/tcpfor a port published to everyone,127.0.0.1:8080->80/tcpfor one published only to the server, and just80/tcpfor one not published at all. Create the container again with-p 8080:80, your own ports in place of these (Docker’s guide).
- nginx: a
-
Restart the program so it reads the change. This changes the server, so it needs
sudoon Linux, and a PowerShell window opened with Run as Administrator on Windows.
Stop the program and start it again the same way you started it before.
sudo systemctl restart nginxIt prints nothing when it works. Run systemctl status nginx to see
active (running).
Job for nginx.service failed because the control process exited with error code.See "systemctl status nginx.service" and "journalctl -xeu nginx.service" for details.Restart-Service W3SVCIt prints nothing when it works: Microsoft’s
reference
says Restart-Service returns no output unless you ask for it. Microsoft
doesn’t publish what it prints when it fails.
For an app run by pm2, on any system:
pm2 restart web[PM2] Applying action restartProcessId on app [web](ids: [ 0 ])[PM2] [web](0) ✓Use --update-env to update environment variables[PM2][ERROR] Process or Namespace web not found- Run step 4 of Check it yourself again. The monitor’s
port should now be listed after
0.0.0.0,*,::or[::].
The monitor has the wrong port or address
Section titled “The monitor has the wrong port or address”This is the likely cause when the program is running and listening for everyone, but on a different port from the one the monitor checks, or when the address in the incident’s reason isn’t your server’s.
-
Open the monitor’s settings and read what it connects to:
- Port monitor: Hostname and Port Number.
- SSL monitor: Domain and Port.
- URL monitor: URL. A port after a colon counts, and otherwise
https://means port 443 andhttp://means port 80.
-
Compare the port with the server’s list from step 4 of Check it yourself. Two mix-ups are common: an
https://address for a site that only serves plainhttp://on port 80, and a monitor on an app’s own port, such as 3000, when the public port is 80 or 443. -
Compare the address. In a reason such as
connect ECONNREFUSED 203.0.113.10:443, the number before the colon is the server DownBad reached. If it isn’t your server’s address, your domain’s DNS records (the settings that turn its name into an address) still point somewhere else, such as a server you moved away from. Update them where you manage your domain. -
Correct the setting and save the monitor.
A firewall rejects the connection
Section titled “A firewall rejects the connection”This is the likely cause when the server’s list shows the program listening for everyone, on the right port, and connecting from outside is still refused. A firewall usually ignores a connection it doesn’t want, which reads as a timeout. One set to reject answers straight away instead, and that looks exactly like nothing listening.
- Check the firewall on the server. On Ubuntu, the firewall is usually ufw,
and reading its rules needs
sudo.
Look in the settings of any firewall the Mac runs for a rule that turns away connections to the monitor’s port.
sudo ufw statusStatus: active
To Action From-- ------ ----443/tcp ALLOW Anywhere443/tcp (v6) ALLOW Anywhere (v6)Status: active
To Action From-- ------ ----443/tcp REJECT Anywhere443/tcp (v6) REJECT Anywhere (v6)A REJECT rule for the monitor’s port is what turns DownBad away
(Ubuntu’s guide to reject and deny).
Look in Windows Defender Firewall’s inbound rules for one that turns away connections to the monitor’s port.
-
On Ubuntu, allow the port. This changes the server, and needs
sudo. Put the monitor’s port in place of 443:Terminal window sudo ufw allow 443/tcpIf it works Rule updatedRule updated (v6)If you left out sudo ERROR: You need to be root to run this scriptMore in Ubuntu’s ufw guide.
-
If the server sits behind another firewall or a router you manage, check that it passes the monitor’s port through to the server as well.
Confirm DownBad sees the fix
Section titled “Confirm DownBad sees the fix”-
Fix the cause first. A check that still fails while you work only adds to the time the incident takes to close.
-
Open the incident and press Test Now. DownBad checks again within a few seconds instead of waiting for the next scheduled check.
-
Wait a minute, then reload the incident page, which doesn’t update by itself. The incident closes by itself once enough checks in a row pass. You can’t close an incident by hand.
How many passing checks it takes. While an incident is open, DownBad checks less often after repeated failures. This is called back-off. Each failed check adds one step of back-off, up to 14. Each passing check takes one step away and asks for the next check straight away. When no steps are left, one more passing check closes the incident. So after a steady outage it takes one more passing check than there were failed checks while the incident was open, counting the one that opened it, and never more than 15.
These are the defaults. The monitor’s notification profile can change them for each monitor type under Backoff Config, and its settings are the ones that count: Recovery is how many passing checks in a row, with no back-off left, close the incident (2 by default, counting the check that takes the last step away), and Start after, Rate and Max interval decide when back-off starts and how far it goes. If the profile changes them, the step counts above and the waits below change with them.
How long that takes. After you press Test Now, those passing checks run back to back, a few seconds apart, so the incident usually closes within a minute. It takes longer when checks are slow to finish, such as a page that takes several seconds to load.
If you don’t press Test Now, the first passing check waits for the next scheduled one. With the default settings, from the third failed check on, DownBad waits 5 more minutes for each failure, up to an hour more than the monitor’s usual interval:
| Monitor checks every | After 1 or 2 failed checks | After 3 | After 6 | After 14 or more |
|---|---|---|---|---|
| 1 minute | 1 minute | 6 minutes | 21 minutes | 61 minutes |
| 5 minutes | 5 minutes | 10 minutes | 25 minutes | 65 minutes |
| 1 hour | 1 hour | 1 hour 5 minutes | 1 hour 20 minutes | 2 hours |
| 1 day | 1 day | 1 day 5 minutes | 1 day 20 minutes | 1 day 1 hour |
Still stuck
Section titled “Still stuck”Before you ask for help, collect:
- the link to the incident, and the reason it shows, word for word
- the output of the commands in Check it yourself, with the time you ran them and your time zone
- the link to your check-host.net results
- the output of
systemctl statusfor your program, or whatever the steps on this page turned up
Then send all of it to us through Contact Us.