Forum / NoMachine for Linux / The session negotiation failed. Error: cannot create a new display.
Tagged: arch linux headless free
- This topic has 5 replies, 2 voices, and was last updated 3 years, 8 months ago by buzz.
-
AuthorPosts
-
March 1, 2021 at 09:09 #32179buzzParticipant
All was working well, then it wasn’t.
I do not know if the NoMachine update or another update broke this, but when I attempt to connect to the NoMachine server on my headless Linux machine, I receive this error:
The session negotiation failed.
Error: Cannot create a new display, please contact your system administratorThis occurs after:
1. I enter my user name and password
2. I respond “yes” to: “Cannot detect any display running. Do you want NoMachine to create a new display and proceed to connect to the desktop?”~/.nx/nxerror.log looks like this:
1580 1580 11:47:33 362.651 Io/Io: WARNING! Descriptor FD#36 type socket still open at exit.
7162 7162 13:43:49 289.251 Io/Io: WARNING! Descriptor FD#34 type socket still open at exit.
53957 53957 15:05:07 579.473 Io/Io: WARNING! Descriptor FD#34 type socket still open at exit.
Error: The remote application terminated unexpectedly.
2270 2270 08:02:13 115.364 Io/Io: WARNING! Descriptor FD#34 type socket still open at exit.
Error: The remote application terminated unexpectedly.
4849 4849 22:20:45 448.492 Io/Io: WARNING! Descriptor FD#34 type socket still open at exit.
Error: The remote application terminated unexpectedly.
Error: The remote application terminated unexpectedly.I have tried logging in to this Linux server from two different Windows 10 machines with the same result. Both used to be able to log in without issue.
Linux server:
- Linux 5.11.1.arch1-1
- NoMachine-7.1.3-2 (free version)
Help! buzz
March 1, 2021 at 18:37 #32195MthContributorHello,
There might be a few reasons for what is happening.
The first question is, this is a headless Linux machine, but is creating a new desktop. Is it a desired thing or you have perhaps a physical session running and want to connect to it?
If it’s the expected behaviour, please check th
e /usr/NX/etc/node.cfg
file and check the DefaultDesktopCommand key if it is set to a valid application. There could also be a hint in the system logs. Please check if there are some mentions of this application there.Another reason might be if the DefaultDesktopCommand application has been updated and stopped being compatible with the default configuration. In this case, we would be happy to see the logs.
Please follow the article on how to enable debug: How to gather debug logs for support requests
Then please do:
sudo /etc/NX/nxserver --restart
Gather the logs either manually or by executing:
sudo /etc/NX/nxserver –debug --collect
Please send the logs to forum[at]nomachine[dot]com using the title of this forum’s thread as the email’s subject.
/Mth
March 8, 2021 at 11:23 #32266buzzParticipantHello,
Thank you for your reply.
I followed your instructions, and the resulting zip file contained 31 files in 31 folders.
I am not able to review each file for private information I do not wish to share, so I will not send them.The problem still exists, and I completed a clean install of NM 7.2.3 this morning.
However, I confirmed that:
1. /usr/bin/startxfce4 is the correct command to start x on my system
2. I connected a monitor to my server and launch x with this command
3. I then attempted to connect to the active desktop with NM 7.2.3
4. I received the same error after I entered my username and password
5. Even with the desktop open on the server, the client still said it could not find the session and asked if I wanted to create a new one
6. I selected yes, and the connection failed anywayI uninstalled NoMachine, deleted all remaining nx or NoMachine files and folders, installed NM 7.2.3 again.
I still cannot connect–even with an x session running.
I pulled this from the log at /usr/NX/etc/nxerror.log:
18712 18712 06:56:51 804.193 Redis: Server started, Redis version 3.0.7.
18712:signal-handler (1615039011) Received SIGTERM scheduling shutdown...
18712 18712 06:56:51 904.587 Redis: User requested shutdown....
18712 18712 06:56:51 904.636 Redis: Saving the final RDB snapshot before exiting..
18712 18712 06:56:51 906.623 Redis: Redis is now ready to exit, bye bye....
19061 19061 06:56:53 236.194 Redis: Server started, Redis version 3.0.7.
19061 19061 06:56:53 236.426 Redis: DB loaded from disk: 0.000 seconds.
19061 19148 06:56:55 303.275 ServerNetworkInfoHandler: WARNING! Obtaining network data failed with result -7.
19061 19274 06:59:18 465.895 ServerNetworkInfoHandler: WARNING! Obtaining network data failed with result -7.
19061:signal-handler (1615039359) Received SIGTERM scheduling shutdown...
19061 19061 07:02:39 948.893 Redis: User requested shutdown....
19061 19061 07:02:39 948.929 Redis: Saving the final RDB snapshot before exiting..
19061 19061 07:02:39 953.782 Redis: Redis is now ready to exit, bye bye....
19061 19061 07:02:39 956.906 HostDescriptorClose: WARNING! Descriptor FD#42 is invalid.
388 388 07:03:03 650.698 Redis: Server started, Redis version 3.0.7.
388 388 07:03:03 651.832 Redis: DB loaded from disk: 0.001 seconds.
388 504 07:03:03 924.631 LocateClient/NameClient: WARNING! Ignoring empty command in context [AA].
Warning: Ignoring empty command in context [AA].
388 506 07:03:03 939.849 ServerNetworkInfoHandler: WARNING! Obtaining network data failed with result -3.
388 549 07:03:04 183.825 ServerNetworkInfoHandler: WARNING! Obtaining network data failed with result -3.
388 793 07:03:14 550.584 ServerNetworkInfoHandler: WARNING! Obtaining network data failed with result -7.
388:signal-handler (1615039949) Received SIGTERM scheduling shutdown...
388 388 07:12:29 541.913 Redis: User requested shutdown....
388 388 07:12:29 542.030 Redis: Saving the final RDB snapshot before exiting..
388 388 07:12:29 547.905 Redis: Redis is now ready to exit, bye bye....
388 388 07:12:29 549.499 HostDescriptorClose: WARNING! Descriptor FD#35 is invalid.
1572 1572 07:12:30 006.369 Redis: Server started, Redis version 3.0.7.
1572 1572 07:12:30 006.596 Redis: DB loaded from disk: 0.000 seconds.
1572 1600 07:12:32 075.226 ServerNetworkInfoHandler: WARNING! Obtaining network data failed with result -7.
1572 1633 07:13:14 584.580 ServerNetworkInfoHandler: WARNING! Obtaining network data failed with result -7.I have no firewall running on this server (it’s just for home use). I also checked to see which ports were in use by nxserver:
# ss -lntup
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port Process
udp UNCONN 8448 0 172.17.0.1:5353 0.0.0.0:* users ("nxserver.bin",pid=1572,fd=37))
udp UNCONN 8448 0 192.168.1.120:5353 0.0.0.0:* users:(("nxserver.bin",pid=1572,fd=36))
udp UNCONN 0 0 0.0.0.0:5353 0.0.0.0:* users:(("nxserver.bin",pid=1572,fd=35))
and# lsof -i
nxserver. 1572 nx 20u IPv4 24826 0t0 TCP localhost.localdomain:24950 (LISTEN)
nxserver. 1572 nx 35u IPv4 24828 0t0 UDP *:mdns
nxserver. 1572 nx 36u IPv4 24841 0t0 UDP myBox.localdomain:mdns
nxserver. 1572 nx 37u IPv4 24842 0t0 UDP myBox:mdnsThank you for your help!
buzz
March 8, 2021 at 11:25 #32267buzzParticipantThis is resolved.
I still do not know what caused the problem initially, but I found that, even though the nxserver.service was running, the server was in “stopped” status.
On the host machine, which is usually headless, I used the NM 7.2.3 UI to enable the server, and it is now working as expected.
If I did not have access to the server directly, how could I have started the server from a remote machine with SSH and FTP access to the server?
Thank you,
buzz
March 26, 2021 at 15:58 #32629MthContributorHello,
The SSH access to the server machine with an account having sudo privileges is required to do any administrative tasks with NoMachine.
I would suggest you do the restart procedure as it will potentially clean up some leftovers from the failed startup procedure.
Command to restart the server:
sudo /etc/NX/nxserver --restart
/Mth
March 29, 2021 at 09:55 #32640buzzParticipantHello,
I’m not a commercial user, so I do not have the ability to access NM via SSH. I can only use NX.
Regardless, I had rebooted numerous times, uninstalled and reinstalled NM.
And then it worked again.
Thank you,
buzz
-
AuthorPosts
This topic was marked as solved, you can't post.