ERROR_PORT_UNREACHABLE (0X000004D2) — Fix in 3 Steps
This error means nothing is listening on that port. Simple firewall check usually fixes it. No service running is the real problem.
What's This Error?
You see ERROR_PORT_UNREACHABLE (0x000004D2) when trying to connect to a remote machine. The error code translates to “no service is operating at the destination network endpoint.” Plain English: the port you're trying to reach has nothing listening on it. Could be a firewall blocking traffic, or the service just isn't running. I see this all the time with SQL Server, IIS, or custom apps on Windows Server 2016–2022.
Don't waste time rebooting the remote box. Start with the simplest checks.
Step 1: Quick Check (30 seconds)
Open a command prompt on the remote machine and run:
netstat -an | find "LISTENING" | find "1433"Substitute your actual port number for 1433. If nothing shows up, nothing's listening. That's your culprit. If it shows listening, the service is up. Move to Step 2.
Also try telnet from the local machine:
telnet <remote-ip> <port>If telnet hangs or fails, you've got a network block.
Step 2: Firewall Check (5 minutes)
If the service is listening, the firewall is blocking the port. On Windows, run this as admin:
netsh advfirewall firewall show rule name=all | find "1433"No results? No rule. Add one:
netsh advfirewall firewall add rule name="Open Port 1433" dir=in action=allow protocol=TCP localport=1433Restart the service or the firewall service. Then retry the connection. For Linux, use iptables -L -n and check for ACCEPT rules on that port.
I've fixed dozens of these by just adding a missing firewall rule. Nine times out of ten, that's it.
Step 3: Service Diagnosis (15+ minutes)
If the firewall is fine and the service is still not listening, something's broken with the service itself. Check the Windows Event Viewer under System and Application logs. Look for errors around the time you tried connecting.
Common causes:
- Service failed to start due to a missing dependency
- Port conflict — two services trying to use the same port
- Application crashed before opening the socket
Restart the service from Services.msc. If it won't start, check the service's log files. For SQL Server, check the ERRORLOG file. For IIS, check the HTTPERR log.
If you're on a remote desktop session and can't even RDP in, you might have a bigger problem. But 95% of the time, this error is either a firewall rule or a service that never started.
Final Tweak: Disable Windows Firewall Temporarily (test only)
Only for testing. Disable Windows Firewall on the remote machine:
netsh advfirewall set allprofiles state offTry connecting again. If it works, you know the firewall was blocking. Re-enable it and add the correct rule. Don't leave firewalls off.
And that's it. Simple fix, almost always works.
Was this solution helpful?