0

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?

KateMak
  • 123
  • 1
  • 6
  • 3
    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. – Paul Jul 22 '21 at 15:17
  • 2
    You have to run the application first, before you can connect to it. – Michael Hampton Jul 22 '21 at 15:20
  • 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." – KateMak Jul 22 '21 at 16:13
  • 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?!? – Massimo Jul 22 '21 at 16:30

1 Answers1

3

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.

vidarlo
  • 3,775
  • 1
  • 12
  • 25
  • 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 – KateMak Jul 22 '21 at 16:10
  • 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... – vidarlo Jul 22 '21 at 16:23
  • 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?!? – Massimo Jul 22 '21 at 16:30
  • @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` – KateMak Jul 22 '21 at 16:33
  • @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. – vidarlo Jul 22 '21 at 16:42