No access to remote PHD2 server

Issue #1330 open
Kim Janny created an issue

I tried to access the remote PHD2 server running on Raspberry Pi inside the same private network(192.168.11.5 for RPi and 192.168.11.6 for my desktop). I turned off both firewall on the server and the desktop. So there is no firewall between the server and my desktop. I tested with telnet and I can see event data coming from PHD2. I cannot find any network issues between them.

I tested this with N.I.N.A 3.1 HF1 but N.I.N.A just complained “No such host is known.”

This is the trace log.

2024-07-08T20:23:36.2246|ERROR|GuiderVM.cs|Connect|259
System.Net.Sockets.SocketException (0x00002AF9): No such host is known.
at System.Net.Dns.GetHostEntryOrAddressesCore(IPAddress address, Boolean justAddresses, AddressFamily addressFamily, Nullable`1 startingTimestamp)
at System.Net.Dns.GetHostEntry(String hostNameOrAddress, AddressFamily family)
at NINA.Equipment.Equipment.MyGuider.PHD2.PHD2Guider.Connect(CancellationToken token) in C:\Projects\nina\NINA.Equipment\Equipment\MyGuider\PHD2\PHD2Guider.cs:line 184
at NINA.WPF.Base.ViewModel.Equipment.Guider.GuiderVM.Connect() in C:\Projects\nina\NINA.WPF.Base\ViewModel\Equipment\Guider\GuiderVM.cs:line 222

Comments (4)

  1. Stefan B repo owner
    • changed status to open

    Please check your firewall settings. I just tried it on two machines where i connected to phd2 over network without a problem.

  2. Kim Janny reporter

    As I mentioned, firewall is already off. Please see the screenshot. I can access the PHD2 server with putty using telnet protocol. But NINA can’t.

  3. Kim Janny reporter

    This is the current firewall setting. They are off. Of course the firewall of server side is also off because I can access PHD2 with telnet.

  4. Kim Janny reporter

    I think I found reason for this error. If I use an ipaddress which doesn’t have a hostname, Dns.GetHostEntry throws an exception. I think you should try something like this.

            try {
                var hostEntry = Dns.GetHostEntry(profileService.ActiveProfile.GuiderSettings.PHD2ServerUrl);
                phd2Ip = hostEntry.AddressList.First(x => x.AddressFamily == AddressFamily.InterNetwork);
            } catch (SocketException ex) {
                if (ex.ErrorCode == 11001)
                    phd2Ip = IPAddress.Parse(profileService.ActiveProfile.GuiderSettings.PHD2ServerUrl);
                else
                    throw new SocketException(ex.ErrorCode, ex.Message);
            }
    

  5. Log in to comment