NX server startup error: Can’t bind localhost

Forum / NoMachine for Mac / NX server startup error: Can’t bind localhost

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #29124
    npatelv
    Participant

    Hi All,

    I am trying to install NoMachine Server on a Mac with Catalina (10.15.6) so I can connect to it from other clients.

    Installation seems to complete successfully, however, the server will not start.

    Looking at nxerror.log, I see the following errors:

    Io/Io: WARNING! Can't bind host 'localhost' to any IP family.
    Io/Io: WARNING! Can't resolve IP host 'localhost'.
    Io/Io: WARNING! Error is 49, 'Can't assign requested address'.

    OpenSocketToListen: ERROR! Unsupported address family

    My hosts file has localhost defined:

    127.0.0.1       localhost
    255.255.255.255 broadcasthost
    ::1             localhost

    Because of the binding errors, nxserver fails to start, and thus, NoMachine will not accept incoming connections.

    Any suggestions on what to try next?

    Thanks in advance!

    #29157
    Britgirl
    Keymaster

    Very strange.

    Would you be willing to run a debug library so we can get some detailed logs from the affected Mac server?

    #29177
    npatelv
    Participant

    @Britgirl, thanks for your response!

    Sure, I’d be happy to help with whatever diagnostic steps you need to run.

    By debug version, are you referring to setting log levels or do you have different library packages you’d like me to run? In the case of the former, I’ve attached both my debug-level logs and my config (which is pretty much stock from install).

    Here are a couple more pieces of information that may be valuable:
    – Machine: Mac Pro (Late 2013) running MacOS Catalina (10.15.6)
    – Machine has 2 x ethernet ports and 1 x wi-fi adapter; wi-fi adapter is set to inactive and both ethernet ports are bound in a link aggregation with a LAN IP of 192.168.0.50
    – Running the command /etc/NX/nxserver –startup results in the failures mentioned above and detailed in the attached logs

    Here are some other things I’ve already tried:
    – I installed the same downloaded binary package on another Mac (a Macbook with wi-fi, also running 10.15.6) on the same LAN and server starts up and accepts connections fine
    – I installed the downloaded binary package on a windows laptop (a Thinkpad X1 with wi-fi, running windows 10) on the same LAN and server starts up and accepts connections fine
    – I have updated /etc/hosts file on affected mac to include different variations of localhost (e.g., localhost.localdomain, localhost4, etc); please see attached config archive
    – Ping and DNS resolution via dscacheutil of “localhost” all work fine and resolve to 127.0.0.1 and ::1

    Hope that helps, but happy to provide any other info you might need!

    Thanks in advance!

    #29192
    Britgirl
    Keymaster

    Hi, thanks for this additional information, this is really useful and the developers are looking further into this. In the meantime, I’m going to send you a private email to the link to the library along with instructions. Once you’ve installed it, you’ll to reproduce the problem and then submit the logs again.

    #29202
    npatelv
    Participant

    @Britgirl, thanks for the debug library; I’ve attached the command output as well as the logs.

    Please let me know if you need any additional information or steps/commands run.

    Attachments:
    #29394
    npatelv
    Participant

    Hi @Britgirl, I just wanted to check in about this issue. Any luck?

    #29396
    Britgirl
    Keymaster

    Hi, the logs didn’t indicate a problem with NoMachine, but I know the developers are still analysing the issue. We’ll update you soon.

    #29450
    fisherman
    Moderator

    Please can you send output of the following commands

    dscacheutil -q host -a name localhost
    ls -l /etc/hosts
    cat /etc/hosts
    #29451
    npatelv
    Participant

    @Britgirl, thank you for following up.


    @Fisherman
    , please see attached for the output of the commands.

    #29775
    fisherman
    Moderator

    It looks everything is OK from NoMachine side.

    Please can you send output of the.
    ls -la /Users/npatelv/.home/hosts

    #29817
    npatelv
    Participant

    @Fisherman, thank you for the follow up.

    I played a hunch and realized the problem was being caused by the fact that I had my hosts file symlinked to my home directory (in an effort to keep it synced with my other machines).

    This used to work fine before, but it looks like the introduction of the sandbox with Mojave and extended with Catalina doesn’t like the symlink anymore.

    I changed the symlink to a hard link and it works fine now.

    Thanks for all of the help @Fisherman and @Britgirl.

Viewing 11 posts - 1 through 11 (of 11 total)

This topic was marked as solved, you can't post.