tig / mcec

Robust remote control of Windows PCs over the network.
https://tig.github.io/mcec/
MIT License
80 stars 13 forks source link

MCEC Client Host is failing on an IP address #29

Closed OlHall closed 1 year ago

OlHall commented 1 year ago

Describe the bug The Host property of the Client mode for MCEC doesn't appear to work with an IP address. It's ok if I use a hostname.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Settings'
  2. Click on 'Client'
  3. Enter an IP in the Host field - e.g. 192.168.1.100
  4. Click OK
  5. Observe the logging window - (see logs below)

Expected behavior MCEC should connect to the server on the given IP address (and port)

Version Information Include the first line from the log window, like this:

2022-12-08 13:54:19,537 INFO  - MCE Controller v2.2.10.2 - OS: Microsoft Windows NT 10.0.22621.0 on x64 - .NET: 4.0.30319.42000

Snippets from the log Include any other relevant logs (either copy/pasted from the MCE Controller window or from the log files found in %appdata%\Kindel Systems\MCE Controller which contain more debug info).

2022-12-08 14:12:00,557 INFO  - Client: Waiting 30 seconds to connect
2022-12-08 14:12:35,523 DEBUG - SocketClient: (BeginConnect) SocketException: No such host is known
2022-12-08 14:12:35,523 DEBUG - No such host is known (11001)
2022-12-08 14:12:35,523 DEBUG - ClientSocketNotificationHandler - ServiceStatus.Error: No such host is known (11001)
2022-12-08 14:12:35,523 ERROR - Client: Error; No such host is known (11001)
2022-12-08 14:12:35,536 INFO  - Client: Stopping...

Desktop (please complete the following information): MCEC is running on a DELL laptop, the Server is a TCP Server running on a Crestron control system (listening on 0.0.0.0:5150)

Additional context I can workaround by adding a dummy host to my local hosts file (c:\windows\system32\drivers\etc\hosts),

e.g.: 192.168.1.200 fakehost

And then use fakehost in the Host field.

tig commented 1 year ago

Thanks for the bug report. I'll look into it asap!

tig commented 1 year ago

I can't reproduce this.

I've tried using both a hostname / IP address for

1) localhost / 127.0.0.1 2) chugach (my local machine name) / 192.168.4.53 3) public DNS name / my home's public IP address 4) core4 / 192.168.4.56 (another local device).

All 8 combinations worked.

I'm going to release a new build with more logging. Would you be willing to try it?

tig commented 1 year ago

Please try with v2.2.11.3. Hopefully the debug spew I added will help track this down.

OlHall commented 1 year ago

I'm not sure how adding Debug info helped... but... 2.2.11.3 fixed it. Many thanks! Could it have been a local issue on my machine last week? Really odd.

2022-12-12 10:59:38,569 INFO - Client: Starting (delay = False) 2022-12-12 10:59:38,572 DEBUG - SocketClient: Connect - 192.168.x.x:5150 2022-12-12 10:59:38,573 DEBUG - SocketClient: 1 IP v4 addresses found 2022-12-12 10:59:38,573 DEBUG - SocketClient: new IPEndPoint(192.168.x.x, 5150) 2022-12-12 10:59:38,573 DEBUG - ClientSocketNotificationHandler - ServiceStatus.Started 2022-12-12 10:59:38,573 INFO - Client: Connecting to 192.168.x.x:5150 2022-12-12 10:59:38,573 DEBUG - SocketClient: BeginConnect(192.168.x.x, 5150) 2022-12-12 10:59:38,576 DEBUG - SocketClient: In BeginConnect call back: 192.168.x.x:5150 2022-12-12 10:59:38,576 DEBUG - SocketClient: BeginConnect succeeded: 192.168.x.x:5150 2022-12-12 10:59:38,576 DEBUG - SocketClient: Back from EndConnect: 192.168.x.x:5150 2022-12-12 10:59:38,576 DEBUG - ClientSocketNotificationHandler - ServiceStatus.Connected 2022-12-12 10:59:38,576 INFO - Client: Connected to 192.168.x.x:5150