Forum / NoMachine for Linux / Error: Cannot create a new display, please contact your system administrator
- This topic has 4 replies, 2 voices, and was last updated 4 years, 2 months ago by fisherman.
-
AuthorPosts
-
August 31, 2020 at 08:11 #29232submarinerParticipant
I have NoMachine_6.11.2_1_amd64.deb installed on an AWS Ubuntu remote EC2 machine.
Seeing the following error on the local machine (using MacOS NoMachine_6.11.2_13.dmg) when I attempt to connect to NoMachine on this AWS remote server:
Error: Cannot create a new display, please contact your system administratorOn the remote server:
I have NoMachine_6.11.2_1_amd64.deb installed on an AWS Ubuntu remote EC2 machine.Seeing the following error on the local machine (using MacOS NoMachine_6.11.2_13.dmg) when I attempt to connect to NoMachine on this AWS remote server:
Error: Cannot create a new display, please contact your system administrator
On the remote server:
$ 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 server logs:
2020-08-30 23:37:24 908.143 7601 NXSERVER User ‘ubuntu’ logged in from ‘x.x.x.x’ using authentication method NX-password.
2020-08-30 23:37:26 248.443 7639 NXNODE WARNING! Process ‘/bin/bash –login -c xrdb -query’ with pid ‘7675/7675’ finished with exit code 127 after 0,008 seconds.
2020-08-30 23:37:26 248.669 7639 NXNODE ERROR! Failed to check xpi value in command xrdb: /bin/bash –login -c ‘xrdb -query”: stderr was: , exit value: 127
2020-08-30 23:37:26 466.088 7639 NXNODE WARNING! Process ‘/bin/bash –norc -c exec -a – /bin/bash -c ‘/etc/X11/Xsession default” with pid ‘7680/7680’ finished with exit code 1 after 0,215 seconds.
2020-08-30 23:37:26 468.354 7639 NXNODE ERROR! Application terminated too early.
2020-08-30 23:37:27 685.302 7639 NXNODE WARNING! NXClientMonitor: NXClientMonitor: NXClient –monitor is not running, can’t send message.
2020-08-30 23:37:27 695.604 7621 NXSERVER ERROR! Received error message from node ‘localhost:4000’, ‘Session failed, application terminated prematurely.’.
2020-08-30 23:37:27 814.065 6976 NXSERVER ERROR! NXFrameBuffer failed to start.
2020-08-30 23:37:27 814.306 6976 NXSERVER ERROR! Received error message from nxserver NX> 501 ERROR: Session failed, application terminated prematurely.\nNX> 501 ERROR: Session failed, application terminated prematurely.
2020-08-30 23:37:27 815.391 7601 NXSERVER ERROR! Received error from nxserver –daemon NX> 501 ERROR: Session failed, application terminated prematurely.\nNX> 501 ERROR: Session failed, application terminated prematurely.
2020-08-30 23:37:28 005.342 7601 NXSERVER User ‘ubuntu’ from ‘x.x.x.x’ logged out.remote:
$ grep DefaultDesktopCommand /usr/NX/etc/node.cfg
DefaultDesktopCommand “/etc/X11/Xsession default”remote
$ ls -al ~/.Xauthority
-rw——- 1 ubuntu ubuntu 0 Aug 30 23:37 /home/ubuntu/.Xauthority==
Any ideas on how to fix this?
$ 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 server logs:
2020-08-30 23:37:24 908.143 7601 NXSERVER User ‘ubuntu’ logged in from ‘x.x.x.x’ using authentication method NX-password.
2020-08-30 23:37:26 248.443 7639 NXNODE WARNING! Process ‘/bin/bash –login -c xrdb -query’ with pid ‘7675/7675’ finished with exit code 127 after 0,008 seconds.
2020-08-30 23:37:26 248.669 7639 NXNODE ERROR! Failed to check xpi value in command xrdb: /bin/bash –login -c ‘xrdb -query”: stderr was: , exit value: 127
2020-08-30 23:37:26 466.088 7639 NXNODE WARNING! Process ‘/bin/bash –norc -c exec -a – /bin/bash -c ‘/etc/X11/Xsession default” with pid ‘7680/7680’ finished with exit code 1 after 0,215 seconds.
2020-08-30 23:37:26 468.354 7639 NXNODE ERROR! Application terminated too early.
2020-08-30 23:37:27 685.302 7639 NXNODE WARNING! NXClientMonitor: NXClientMonitor: NXClient –monitor is not running, can’t send message.
2020-08-30 23:37:27 695.604 7621 NXSERVER ERROR! Received error message from node ‘localhost:4000’, ‘Session failed, application terminated prematurely.’.
2020-08-30 23:37:27 814.065 6976 NXSERVER ERROR! NXFrameBuffer failed to start.
2020-08-30 23:37:27 814.306 6976 NXSERVER ERROR! Received error message from nxserver NX> 501 ERROR: Session failed, application terminated prematurely.\nNX> 501 ERROR: Session failed, application terminated prematurely.
2020-08-30 23:37:27 815.391 7601 NXSERVER ERROR! Received error from nxserver –daemon NX> 501 ERROR: Session failed, application terminated prematurely.\nNX> 501 ERROR: Session failed, application terminated prematurely.
2020-08-30 23:37:28 005.342 7601 NXSERVER User ‘ubuntu’ from ‘x.x.x.x’ logged out.remote:
$ grep DefaultDesktopCommand /usr/NX/etc/node.cfg
DefaultDesktopCommand “/etc/X11/Xsession default”remote
$ ls -al ~/.Xauthority
-rw——- 1 ubuntu ubuntu 0 Aug 30 23:37 /home/ubuntu/.Xauthority==
Any ideas on how to fix this?
August 31, 2020 at 09:19 #29244fishermanModeratorCan you make sure that you have installed Desktop Environment.
Here you can find more information on setup https://www.nomachine.com/accessing-your-remote-linux-desktop-on-amazon-elastic-compute-cloud-via-NoMachine.
August 31, 2020 at 14:17 #29260submarinerParticipantThank 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/.XauthorityLooking 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?
September 1, 2020 at 07:41 #29267submarinerParticipantThe 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.cfgTheir 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?
September 2, 2020 at 16:10 #29333fishermanModeratorI verified procedure to install NoMachine on AWS and everything is correct from the article.
when you are executing nxserver commands can you make sure that you are using double dash like “
--restart
” likesudo /etc/NX/nxserver --status sudo /etc/NX/nxserver --restart
https://www.nomachine.com/DT10O00163 (“How to gather debug logs for support requests”)
If you still having the issue please send the logs to forum[at]nomachine[dot]com using the title of this forum’s thread as the mail’s subject.
-
AuthorPosts
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.