submariner

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • submariner
    Participant

    The problem with the previous (Ubuntu) EC2 machine was so severe that the virtual machine would not even reboot, so for the sake of time, I just terminated it.

    And, because https://www.nomachine.com/accessing-your-remote-linux-desktop-on-amazon-elastic-compute-cloud-via-NoMachine covers how to set up NoMachine for Red Hat, I created a new AMI using RHEL8, and followed the instructions from https://www.nomachine.com/accessing-your-remote-linux-desktop-on-amazon-elastic-compute-cloud-via-NoMachine almost verbatim, including “Set Port Range to 4000” in the Configuring the security group section.

    One step I had to do differently was instead of:
    $ sudo yum groupinstall -y “Desktop”

    and thanks to your helpful tip: The ‘Desktop’ command is specific to RH6 and changes according to the OS and version you are installing. For a list of what you can install run

    ‘yum grouplist’

    I did run

    $ sudo yum groupinstall -y “Server with GUI”

    and that finished successfully.

    Then I did:

    $ sudo yum install nomachine_6.11.2_1_x86_64.rpm

    which also finished successfully.

    NoMachine seems to be running on the remote server:

    $ netstat -lpn|grep 4000
    (Not all processes could be identified, non-owned process info
    will not be shown, you would have to be root to see it all.)
    tcp        0      0 0.0.0.0:4000            0.0.0.0:*               LISTEN      –
    tcp6       0      0 :::4000                 :::*                    LISTEN      –

    But I’m still unable to open a Desktop session on this new remote RHEL8 server running NoMachine using my local NoMachine app.

    When I try, on the local side I see the error: “Ooops! Cannot find the default environment. Please contact your system administrator.”

    This attempt shows on the server side as:

    $ sudo tail -f /usr/NX/var/log/nxserver.log

    2020-08-31 23:27:03 450.429 105090 NXSERVER User ‘ec2-user’ logged in from ‘xxxx’ using authentication method NX-private-key.
    2020-08-31 23:27:07 037.543 105090 NXSERVER WARNING! Process ‘/usr/NX/bin/nxexec nxfwget.sh firewall-cmd firewall-cmd’ with pid ‘105384/105384’ finished with exit code 252 after 0,343 seconds.
    2020-08-31 23:27:07 037.794 105090 NXSERVER WARNING! Cannot check firewalld status. Exit value ‘252’.Please check the ‘nxerror.log’ file for possible issues.
    2020-08-31 23:27:07 362.219 105090 NXSERVER WARNING! Process ‘/usr/NX/bin/nxexec nxfwadd.sh firewall-cmd 4015 udp 0’ with pid ‘105389/105389’ finished with exit code 252 after 0,323 seconds.
    2020-08-31 23:27:07 362.453 105090 NXSERVER WARNING! Cannot add firewall rule for 4015 with firewall-cmd command 252. Please check the nxerror.log file for possible issues.

    $ sudo tail -f /usr/NX/var/log/nxerror.log
    FirewallD is not running
    FirewallD is not running
    Info: Connection from xxxx port 54035 closed on Mon Aug 31 23:16:59 2020.
    Info: Handler with pid 104475 terminated on Mon Aug 31 23:16:59 2020.
    Info: Handler started with pid 105090 on Mon Aug 31 23:26:59 2020.
    Info: Handling connection from 76.179.21.178 port 54063 on Mon Aug 31 23:26:59 2020.
    FirewallD is not running
    FirewallD is not running
    Info: Connection from xxxx port 54063 closed on Mon Aug 31 23:27:07 2020.
    Info: Handler with pid 105090 terminated on Mon Aug 31 23:27:07 2020.

    It’s true, firewalld is not running. But given the fact that the link above mentions using the AWS Security Group to open TCP port 4000, I don’t understand NoMachine’s need for firewalld.

    And I don’t understand why I see “NX> 500 ERROR: Invalid command: ‘-–status’ (and the manpage for nxserver)” when I run:

    $ sudo /etc/NX/nxserver -–status

    on this RHEL8 server whereas I saw reasonable output on the Ubuntu server.

    Even

    $ sudo /etc/NX/nxserver -–version

    reports:

    “NX> 500 ERROR: Invalid command: ‘-–version'”

    Will I need to modify any of this config files?

    $ ls -l  /etc/NX/server/localhost/
    total 16
    -rw-r–r–. 1 root root 607 Aug 31 18:15 client.cfg
    -rw-r–r–. 1 root root 605 Aug 31 18:15 node.cfg
    -rw-r–r–. 1 root root 607 Aug 31 18:15 player.cfg
    -rw-r–r–. 1 root root 607 Aug 31 18:15 server.cfg

    Their content all looks pretty reasonable although I don’t really know what to expect to find there.

    Any help on this new problem? It seems to be due to my not running firewalld, but should I need to do so?

    submariner
    Participant

    Thank you for the very quick and helpful reply. I was indeed missing the Desktop Environment (I had mistakenly assumed that it would get included as a dependency when I installed Firefox).

    So I did:

    $ sudo apt update

    $ sudo apt upgrade

    $ sudo apt install ubuntu-desktop

    all of which completed successfully.

    Unfortunately, I’m still unable to connect to the desktop using NoMachine. The behavior is different now. During the ~3 minutes (it failed much more quickly previous to the desktop installation) that the NoMachine connection attempt was in process, my ssh session to the same machine became unresponsive (which I interpreted to mean that the NoMachine connection attempt to start up the desktop remotely was consuming a great deal of bandwidth, so I waited patiently), but after ~3 minutes or so, ultimately the local NoMachine app reported:

    The session negotiation failed.

    Error: Cannot create a new display, please contact your system administrator

    On the remote server side for this connection attempt, logs indicated:

    $ sudo tail -f /usr/NX/var/log/nxserver.log

    2020-08-31 12:20:20 048.417 16795 NXSERVER User ‘ubuntu’ logged in from ‘xxxx’ using authentication method NX-password.
    2020-08-31 12:23:12 568.173 16833 NXNODE WARNING! NXClientMonitor: NXClient –monitor is not ready to accept initialization messages for 120 seconds. Reach timeout to send.
    2020-08-31 12:23:17 843.420 16833 NXNODE ERROR! NXClient –monitor exceeded maximum initialize time of ‘120’ seconds.
    2020-08-31 12:23:33 668.458 16833 NXNODE WARNING! NXClientMonitor: NXClient –monitor with pid 16894 did not exit within 5 seconds. Killing process.
    2020-08-31 12:23:39 084.325 16833 NXNODE WARNING! Process ‘/usr/NX/bin/nxclient –monitor –pid 16874’ with pid ‘16894/16894’ finished with signal 9 after 196,977 seconds.
    2020-08-31 12:23:39 369.020 16815 NXSERVER ERROR! Node reported monitor failure. Killing attached sessions.
    2020-08-31 12:23:39 381.314 16833 NXNODE ERROR! Cannot create a virtual session.
    2020-08-31 12:23:39 381.423 16833 NXNODE ERROR! Cannot connect to NoMachine monitor.
    2020-08-31 12:23:39 478.049 16815 NXSERVER ERROR! Received error message from node ‘localhost:4000’, ‘Cannot connect to NoMachine monitor.’.
    2020-08-31 12:23:41 391.002 6976 NXSERVER ERROR! NXFrameBuffer failed to start.
    2020-08-31 12:23:41 411.218 6976 NXSERVER ERROR! Received error message from nxserver NX> 500 ERROR: Cannot connect to NoMachine monitor.
    2020-08-31 12:23:41 412.268 16795 NXSERVER ERROR! Received error from nxserver –daemon NX> 500 ERROR: Cannot connect to NoMachine monitor.
    2020-08-31 12:23:41 862.407 17616 NXSERVER WARNING! Cannot write to FD#1.
    2020-08-31 12:23:41 862.555 17616 NXSERVER WARNING! Error is: 32, ‘Broken pipe’.
    2020-08-31 12:23:41 886.519 16795 NXSERVER User ‘ubuntu’ from ‘xxxx’ logged out.

    remote:
    ~$ sudo /etc/NX/nxserver –status
    NX> 111 New connections to NoMachine server are enabled.
    NX> 162 Enabled service: nxserver.
    NX> 162 Disabled service: nxnode.
    NX> 162 Enabled service: nxd.

    remote:

    $ ls -al ~/.Xauthority
    -rw——- 1 ubuntu ubuntu 0 Aug 31 12:23 /home/ubuntu/.Xauthority

    Looking at the EC2 instance monitoring tab does indeed show a large spike in network activity (>100MB in and out) and CPU utilization.

    I tried it a second time and found the the ssh session became unresponsive for more than 30 minutes after the second attempt, even after I quit NoMachine on the local side. I was also unable to get a response to a second attempt to ssh into the remote machine.

    I followed instructions at the link you provided for installing the desktop environment (substituting equivalent Ubuntu commands in place of RH commands).

    Any other thoughts on what I can do to troubleshoot and/or solve this problem?

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