Score:0

Connecting To 127.0.0.1…Could not open connection to the host, on port 8123: Connect failed

jp flag

enter image description here

Well aware this has been asked, but I have scoured Google/StackOverflow and tried every single suggested solution, without being able to connect to port 8123 on my local (which is running Windows 10). It is worth noting that I CAN connect when I use port 8080. But I need 8123 to run a legacy application that has the port hardcoded in many (random) places...I have done the following:

  • Created and Inbound rule through my firewall for the port (and an outbound rule just in case).
  • Tried turning off the firewall and Window's Defender.
  • Used netstat -an | findstr "8123" to see if it is in use (not found).
  • Used netstat -aon | findstr "8123" to see if it is in use (not found).
  • Used cports application to see if it is in use (not found).
  • Used netsh interface ipv4 show excludedportrange protocol=tcp to ensure 8123 is not in any excluded range.
  • Disabled Hyper-V, still failed so I re-enabled it.
  • Checked my system's proxy settings - doesn't look like it is using any proxy: enter image description here

Here is the error I get when I try to run the legacy application:

System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://127.0.0.1:8123/npsharp/localServices/IPos/eb84421f-b4cd-4827-abaa-81327afc36e1/ExecuteAction that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refuse.

I am absolutely at loss for why in the world it cannot connect to this port. The port is not being blocked by firewall, not in use, and not in any excluded range. My machine is not going through any proxy. Is there something I am missing that I have not tried?

Paul avatar
cn flag
I am so the wrong guy to comment on a Windows or telnet problem, but is there anything listening on the port? I wouldn't expect anything to open a connection where there isn't something listening.
Michael Hampton avatar
cz flag
You have to run the application first, before you can connect to it.
jp flag
Edited to add the exception I get when trying to run the application "Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refuse."
Massimo avatar
ng flag
The application you are running is a *client* that wants to connect to 127.0.0.1:8123. But *what* is supposed to be listening there?!?
Score:3
ar flag

I am absolutely at loss for why in the world it cannot connect to this port. The port is not being blocked by firewall, not in use, and not in any excluded range.

You can't connect to a port where nothing listens. The operating system will simply shrug its virtual shoulders and send you a RST.

To test connectivity, you need something listening on that port. It has to be in use for you to be able to connect to it.

Start your application. Check that it works as expected. If the application doesn't start, look into error messages or logs produced by that application. It's not because it can't bind that port probably.

jp flag
I should have clarified, this is the error I get when I start the application. Will edit to add this: System.ServiceModel.EndpointNotFoundException: There was no endpoint listening at http://127.0.0.1:8123/npsharp/localServices/IPos/eb84421f-b4cd-4827-abaa-81327afc36e1/ExecuteAction that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException for more details. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused
vidarlo avatar
ar flag
What is supposed to serve up that endpoint? The application it self? Debugging unknown applications remotely with no knowledge of how it's built is quite difficult...
Massimo avatar
ng flag
The application you are running is a *client* that wants to connect to 127.0.0.1:8123. But *what* is supposed to be listening there?!?
jp flag
@vidarlo I think the application itself....there is an install script that has this line: `netsh.exe http add urlacl url=http://+:8123/ user=BUILTIN\\Users 1>NUL 2>NUL`
vidarlo avatar
ar flag
@KateMak I'm sorry, but when you don't know how the application is supposed to work, and don't point to any documentation or even name the application it's impossible to debug this. Finding faults often requires understanding how things are supposed to work.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.