After restart can no longer connect

Forum / NoMachine for Linux / After restart can no longer connect

Tagged: ,

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #46273
    eiger3970
    Participant

    Hello,

    I installed NoMachine 8.10.1 on Ubuntu 22.04.3 and NoMachine Version 8.7.1 on iPhone X iOS Version 16.3.1.

    Ubuntu Terminal I initially ran these commands:

    Terminal -> cd /usr -> sudo wgethttps://download.nomachine.com/download/8.10/Linux/nomachine_8.10.1_1_x86_64.tar.gz -> sudo -xzf nomachine_8.10.1_1_x86_64.tar.gz -> sudo nomachine -> sudo /usr/NX/nxserver –install/

    iPhone I installed and entered:

    Name: public WAN IP -> Protocol: NX -> Host: 192.168.1.120 -> Port 4000.

    This connected and I was able to remote view.

    After a reboot, the phone shows: Connecting to publicWanIp -> error: Ooops! A connection timeout has occurred while trying to connect to ‘192.168.1.120’ on port ‘4000’. The issue could either be caused by a network problem, by a firewall or NAT blocking incoming traffic or by a wrong server address. Please verify your configuration and try again.

    Strangely, I haven’t changed any Desktop or Phone settings and on the previous success I don’t remember port forwarding 4000.

    #46339
    Tom
    Participant

    Hi Eiger3970,
    This seems to be an issue on the Ubuntu server side. I can tell by the IP address that you are connecting to a local network.
    Is it true? Does the Ubuntu server still have the address 192.168.1.120? Can you ping Ubuntu from your local network?

    Please check if NoMachine works on Ubuntu, in console enter command: 
/usr/NX/bin/nxserver --status

    You should see

    NX> 111 New connections to NoMachine server are enabled.
    NX> 161 Enabled service: nxserver.
    NX> 161 Enabled service: nxnode.
    NX> 161 Enabled service: nxd.

    If any service is not working try command:
    sudo  /usr/NX/bin/nxserver –restart

    It will restart NoMachine

.
    Check if all services are working

    Regards,
    Tom

    #46423
    eiger3970
    Participant

    Yes, I am trying to connect to this local Ubuntu machine with IP 192.168.1.120.

    I am trying to connect from my mobile phone, so I would imagine some type of public WAN IP address would be needed for packets to reach my address?

    NoMachine works as per the command check.

    My confusion or error probably is due to wrong IP addresses entered into the NoMachine client/viewer.

    My ISP has a CGNAT, so I use a VPN and tunnel via TailScale, but I’m confused on NoMachine’s configuration and which TailScale IP address to use?

    #46439
    Tom
    Participant

    Hi Eiger3970,
    if you have Tailscale installed on an Ubuntu server and on iPhone and both are connected to the same Tailscale account, you should connect to the IP address shown in the Tailscale application for this Ubuntu server on iPhone  e.g. 10.85.115.4.

    Regards,
    Tom

    #46442
    eiger3970
    Participant

    I ran this test and port 80 connected, but 5900 didn’t?

     

    $ sudo apt install netcat-openbsd && nc -vv 1.1.1.1 80

    [sudo] password for ubuntu:

    Reading package lists… Done

    Building dependency tree… Done

    Reading state information… Done

    netcat-openbsd is already the newest version (1.218-4ubuntu1).

    0 to upgrade, 0 to newly install, 0 to remove and 5 not to upgrade.

    Connection to 1.1.1.1 80 port [tcp/http] succeeded!

    #46487
    Tom
    Participant

    Hi Eiger3970,
    I don’t fully understand what you want to achieve with the netcat test.
    Why do you expect port 5900 to be open?
    If you have not changed the settings in server.cfg, you should have port 4000 open on Ubuntu and connect to the iPhone there

    To check what ports are open on Ubuntu, use the command: sudo netstat -ntlp

    The Tailscale connection should look like this:
    1. Tailscale installed and running on Ubuntu
    2. Tailscale is installed and running on your iPhone
    3. On the iPhone, in the Tailscale application, check what IP address Ubuntu received
    4. In the NoMachine iPhone app enter the IP address displayed by Tailscale for Ubuntu.

    Tailscale should replace port forwarding on your router and bypass firewalls.

    If the NoMachine connection doesn’t work, check if you can ssh from your iPhone to Ubuntu using Tailscale, and you can also try to see if ping works.

    Regards,
    Tom

    #46507
    eiger3970
    Participant

    Thank you for the reply.

    I don’t know, I think that’s before I understood that port forwarding is no longer needed with ISP CGNATs and VPN/Tunnels.

    ubuntu@ubuntu:~$ sudo netstat -ntlp

    [sudo] password for ubuntu:

    Active Internet connections (only servers)

    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name

    tcp        0      0 192.168.122.1:53        0.0.0.0:*               LISTEN      1326/dnsmasq

    tcp        0      0 127.0.0.1:8384          0.0.0.0:*               LISTEN      147154/syncthing

    tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      265892/cupsd

    tcp        0      0 127.0.0.1:5900          0.0.0.0:*               LISTEN      1599/qemu-system-x8

    tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      887/systemd-resolve

    tcp6       0      0 :::22000                :::*                    LISTEN      147154/syncthing

    tcp6       0      0 ::1:631                 :::*                    LISTEN      265892/cupsd

    tcp6       0      0 :::3389                 :::*                    LISTEN      2370/gnome-remote-d

    I don’t have a TailScale app per se installed on Ubuntu 22.04.3, however I did follow the TailScale setup, which seems to install whatever public and private keys are needed.

    TailScale website login confirms and connection to this Desktop and the iPhone.

    On the iPhone, I open the TailScale app and connect to TailScale, so that TailScale shows a connection to the Desktop and iPhone.

    In NoMachine, the IP to connect to this machine is 192.168.1.120, however error: no connection.

    I did try the TailScale Desktop connection IP, however same error?

    I also tried from a 2nd Desktop machine.

    I’ll try the ping tests.

    #46509
    Tom
    Participant

    Hi Eiger3970,

    Let’s break your problem down into smaller pieces to try to solve it.

    1) You need to check if you can connect to Ubuntu using NoMachine from some device on the local network.

    By executing the command sudo netstat -ntlp you should see something similar to this:
    tcp        0      0 127.0.0.1:21895         0.0.0.0:*               LISTEN      650/nxserver.bin
    tcp        0      0 127.0.0.1:21894         0.0.0.0:*               LISTEN      650/nxserver.bin
    tcp        0      0 127.0.0.1:35491         0.0.0.0:*               LISTEN      942527/node
    tcp        0      0 127.0.0.1:7001          0.0.0.0:*               LISTEN      2606/nxnode.bin
    tcp        0      0 127.0.0.1:12001         0.0.0.0:*               LISTEN      2606/nxnode.bin
    tcp        0      0 0.0.0.0:4000            0.0.0.0:*               LISTEN      1160/nxd

    Since you can’t see it, please run the command:
 sudo /usr/NX/bin/nxserver --status
    Paste the results of the nxserver --status command



 here

    You can move to the next point and work on it, after solving this first problem.

    2) Tailscale must be configured to enable peer-to-peer connection
    I understand you want to use Tailscale to connect to Ubuntu when you are away from the office/home?
    In my opinion, if you don’t have Tailscale installed on your router, it should be installed on Ubuntu.
    If you want to bypass port forwarding on your router, you must have Tailscale installed on both devices (it can also be another VPN that creates peer to peer networks).
    Tailscale will create a VPN between them. The way it works is that your Ubuntu will connect to the Tailscale server, the traffic is outgoing so it won’t be blocked by firewall etc. There are exceptions to this, check if you need to change something in your router settings: https://tailscale.com/kb/1181/firewalls?q=firewall

    Your mobile will also connect to this Tailscale server. Both devices will be in the same virtual network, even if you are away from the office/home. In the Tailscale app, you should see all devices connected to your Tailscale account, including Ubuntu and his virtual IP. The Ubuntu IP address will be different from your home/work network, e.g. 10.1.167.111 and you must connect to your iPhone to this address.

    Regards,
    Tom

    #46515
    eiger3970
    Participant

    ubuntu@ubuntu:/usr$ ls

    bin    include  lib32  libexec  local                             NX                sbin   src

    games  lib      lib64  libx32   nomachine_8.10.1_1_x86_64.tar.gz  README-NOMACHINE  share

    ubuntu@ubuntu:/usr$ cd NX/

    ubuntu@ubuntu:/usr/NX$ ls

    etc  nxserver

    ubuntu@ubuntu:/usr/NX$ sudo /usr/NX/bin/nxserver --status

    sudo: /usr/NX/bin/nxserver: command not found

    #46536
    Tom
    Participant

    Hi Eiger3970,
    I don’t know if you changed anything in your configuration.
    You should have a bin directory in /usr/NX/. If you don’t know how to fix it because moving this directory was not intentional, try install NoMachine again and check with --status if it works.

    I suggest downloading the deb package for Ubuntu from our website and installing this package.
    You can do this with the command sudo dpkg -i nomachine_8.10.1_1_amd64.deb.

    Regards,
    Tom

    #46552
    eiger3970
    Participant

    All default install settings.

    ubuntu@ubuntu:~$ cd /usr/

    ubuntu@ubuntu:/usr$ ls

    bin    include  lib32  libexec  local                             NX                sbin   src

    games  lib      lib64  libx32   nomachine_8.10.1_1_x86_64.tar.gz  README-NOMACHINE  share

    ubuntu@ubuntu:/usr$ cd NX/

    ubuntu@ubuntu:/usr/NX$ ls

    etc  nxserver

    ubuntu@ubuntu:/usr/NX$ --status

    --status: command not found

    ubuntu@ubuntu:/usr/NX$ NX --status

    NX: command not found

    #46573
    Tom
    Participant

    Hi Eiger3970,
    as I wrote, you need to install NoMachine first.

    Download the deb package for Ubuntu from our website and install this package.
    In console use the command: sudo dpkg -i nomachine_8.10.1_1_amd64.deb.

    After installation, check with --status whether NoMachine is working.

    Regards,
    Tom

    #46577
    eiger3970
    Participant

    ubuntu@ubuntu:~$ sudo /usr/NX/nxserver --install

    [sudo] password for ubuntu:

    nawk: cannot open /usr/NX/etc/server.cfg (No such file or directory)

    /etc/NX/nxserver: line 167: /usr/NX/bin/nxserver.bin: No such file or directory

    NX> 700 Starting installation at: Thu, 04 Jan 2024 09:24:16.

    NX> 700 Using installation profile: Ubuntu.

    NX> 700 Installation log is: /usr/NX/var/log/nxinstall.log.

    NX> 700 Installing nxrunner version: 8.10.1.

    NX> 700 Installing nxplayer version: 8.10.1.

    NX> 700 Installing nxnode version: 8.10.1.

    NX> 700 Installing nxserver version: 8.10.1.

    NX> 700 Installation completed at: Thu, 04 Jan 2024 09:24:22.

    NX> 700 NoMachine was configured to run the following services:

    NX> 700 NX service on port: 4000

    #46602
    Tom
    Participant

    Hi Eiger3970,
    try installing from the deb package and dpkg command, as I wrote previously about the installation.
    Before installation, delete the entire NX folder from /usr.

    Regards,
    Tom

    #46617
    eiger3970
    Participant

    Yes, I removed directory /usr/NX.

    As per your post #46536, I tried installing via Terminal$ sudo dpkg -i nomachine_8.10.1_1_amd64.deb., however error: dpkg: error: cannot access archive ‘nomachine_8.10.1_1_amd64.deb’: No such file or directory

    I downloaded NoMachine for Linux – amd64, version 8.10.1_1 from the website (https://downloads.nomachine.com/download/?id=5). Running nomachine_8.10.1_1_amd64.deb shows error: Unable to install nomachine: Error while installing package: new nomachine package pre-installation script subprocess returned error exit status 127.

Viewing 15 posts - 1 through 15 (of 18 total)

Closed because the user did not provide further feedback. Please notify us if you confirm that it is resolved or open a new topic if you have the same problem.