NoMachine quit working after Mac sleep disconnect? (Not blank screen issue)

Forum / NoMachine for Mac / NoMachine quit working after Mac sleep disconnect? (Not blank screen issue)

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #35247
    nxmac
    Participant

    I’ve been using NoMachine 7.6.2 on my M1 Mac Mini for about 10 days.  I have connected a few times today, but my most recent attempt was not successful.  Any time I am not looking at the NoMachine player for 10 minutes or more, it gets disconnected and I have to do the VNC blank screen workaround discussed in another recent thread.  This has not been problematic up until now, but today, when I signed in for a subsequent attempt, the NoMachine player said something to the effect of “No desktops are available.”  Through VNC, I can see that the NoMachine icon is missing from the top right corner as well.  When I start NoMachine from launcher, it pops up and I can go to Settings -> Server -> Status and see “Querying the server” and “Desktop not shared” but after doing that, I can no longer connect from the player, I now get “The session negotiation failed” instead.  On the Mac, if I click the “Changes disabled” lock at the bottom of the server settings screen and enter my password, I still don’t see any options to start/stop the service.  The icon in the top corner after starting NoMachine from the launcher has options to show info, but not to start/stop the service.  It also has “Quit nomachine player” at the bottom of the menu as if it isn’t the server icon.  I can’t reboot remotely due to FileVault being in use on the system drive.  Is there any way to get NoMachine working again outside of a reboot?  Do I need to submit any logs regarding NoMachine seemingly stopping on its own?

    #35265
    Britgirl
    Keymaster

    Hi, I will contact you privately with a link to download a patched package for a similar issue. After installing, if the problem is still there, logs would be useful. Check your inbox.

    #35272
    nxmac
    Participant

    The icon came back and the desktop was shared again as soon as the install completed.  I had not considered attempting to re-install the old version, so I don’t know if the re-install restarted the server or if the new version fixes the issue.  In either case, it appears I can also connect without the VNC workaround now.  I will update this topic again if I see the same behavior in the future.  It may be more than a couple weeks if the behavior is caused by time online, because I may reboot the Mac to reconnect a UPS, which would reset that.

    #35274
    nxmac
    Participant

    Follow-up to my previous post…  The black screen issue may be resolvedly the patched package, but there is still a sleep issue.  I can now connect and login immediately after closing VNC (couldn’t before, had to type before closing VNC), but once the sleep timeout occurs, I still cannot connect at all.  I left NoMachine Player connected in the background for over 10 minutes so the Mac went to sleep.  When I brought the NoMachine player back to the foreground, it did what it always does when this happens, which is try to reconnect.  Because of the blank screen issue, I would normally connect VNC in order to wake the Mac and then NoMachine Player would reconnect (technically, that lead to me not discovering this second issue before now).  Since I was intentionally testing for the blank screen issue, I didn’t connect VNC, and NoMachine Player ultimately timed out on trying to reconnect.  IOW, NoMachine may be waking the screen now, but it isn’t waking the Mac like a VNC client does via the built-in Remote Management feature.  I wanted to verify this anyway, so most of that was planned.  Here are the basic reproduction steps:

    1. Connect NoMachine Player to M1 Mac
    2. Bring a different window into focus on client until Mac is sleeping and NoMachine Player is disconnected
    3. Bring NoMachine Player back to foreground to watch it try to reconnect (and ultimately time out)

    My power options are “Turn display off after 10 min” and “Wake for network access”

    “Prevent computer from sleeping automatically when the display is off” is NOT checked, and the external (only) monitor was powered off during my testing.  I have closed out of NoMachine player and started it back up to reconnect without using VNC after a partial minute, but I have not tested longer increments between 1 and 10 minutes.  As there aren’t really any other energy saver settings, I am assuming the M1 Mac is going to sleep after 10 minutes with no keyboard/mouse activity even though my settings don’t explicitly indicate that.  That theory is supported by the fact that things like cloud synchronization apps and e-mail will stop updating after 10 minutes while this setting remains unchecked, but will keep updated perpetually if I check it.  I suspect the logic is for the Mac to go to sleep when the display is put to sleep while having the display physically turned off doesn’t actually change the timer for the Mac’s sleep (IOW, I suspect this setting is just poorly labeled).

    #35296
    Britgirl
    Keymaster

    Thanks for this detailed information. The patch helps with the display sleep issue but not with when the computer actually goes into stand-by. We’ll continue with our investigation.

    #35398
    nxmac
    Participant

    This issue has recurred, and I wanted to provide more information before trying to troubleshoot further and losing direct access to the details.  Today, on Big Sur 11.6 with the NoMachine 7.6.2 provided above, I had the following order of events (not certain they are all relevant, but if they are, it could be the same as last time and could be actions vs time online):

    1. While connected with NoMachine player, after troubleshooting for the upside down screen issue mentioned in another thread, the NoMachine icon was showing on the Dock even after I closed the only window.
    2. Because the icon isn’t normally there and I don’t want it there, I clicked it to create a new Window and used command+q to close the app.  This got rid of the icon.  The icon in the menu bar stayed, and NoMachine player stayed connected to the desktop.
    3. Blank screen timeout occurred, and NoMachine Player was disconnected.
    4. I woke up the Mac using [removed] to connect to management, then tried to connect with NoMachine player.
    5. NoMachine player prompted for credentials, and after login, stated “<no available desktops on this server>”.
    6. I connected to the Mac using [removed] and noticed the NoMachine icon was gone from the menu bar.
    7. I started NoMachine from Launchpad and the icon reappeared in the menu bar.
      • NoMachine player still appears to be connected on the client with the text from (5) (don’t remember doing this in OP).
      • Server Settings -> Status says “No connected users” (don’t remember checking this in OP).
      • The “Querying the server” icon is greyed out and “Desktop not shared” is shown (same as OP).
      • The buttons for restart server, stop server, and shutdown server are missing (same as OP).
    8. After noting everything above, I closed NoMachine player again and tried to reconnect.  This yielded “The session negotiation failed. Error: Cannot connect to the requested session” (same as OP).
    9. Once again, I am remote and cannot reboot.  The only option on the icon in the menu bar is “Quit NoMachine player”, and it does just that.  I ran the 7.6.2_3 installation package again and it appears to have resolved the issue (NoMachine icon in menu bar now shows desktop shared and says “Quit NoMachine Service” as final option + I can connect with NoMachine player again), meaning re-installation is a good workaround.

    I don’t know what makes the NoMachine icon stick in the Dock, but I suspect command+q on any NoMachine window is what causes the issue.  I also suspect that there should be another (CLI?) way that I can re-launch the service without re-installing or rebooting regardless of whether or not the behavior caused by command+q is a bug.

    #35399
    nxmac
    Participant

    Follow-up to my previous post…  I wanted to clarify that while I am not certain if the command+q behavior is a bug, I do believe that the stuck icon in the dock is a bug.  To be clear, my dock preferences have “Show recent applications in dock” disabled, so it is showing the “running application” icon as opposed to a “recent application” icon.  This is why I use command+q to get rid of that icon.  To elaborate, I believe the designed behavior is for the icon to only be shown in the menu bar as is the case immediately after installation or reboot.  I also know my expected (/ presumed designed) behavior is possible because KeePassXC performs that way.  It is always shown in the menu bar, but when a window is visible, it is shown in the dock, and when that window is closed (red x in top left of window), the icon disappears from the dock.

    #35404
    nxmac
    Participant

    Well, I just tried to connect with NoMachine player and couldn’t again.  The icon is gone again, and while the issue still seems similar, it appears that perhaps Big Sur 11.6 has made it worse.  This time command+q definitely was not involved and I wasn’t connected to begin with when the Mac went to sleep.  Also different: by the time I noticed the issue, I was presented with the second error message after a long connect attempt (normal for the second error message, basically it’s timing out) without any prior action on the Mac.

    #35819
    nxmac
    Participant

    I had this issue where NoMachine stops serving happen again today.  I was hoping I could figure out a way to restart the service, but I didn’t have much luck.

    Running launchctl list | grep -v apple showed that com.nomachine.nxserver had no PID, but I couldn’t figure out what I would need to include in launchctl load to resolve this.

    Running /Applications/NoMachine.app/Contents/MacOS/nxplayer as an admin would show the server was running, but I still couldn’t. connect.

    Running /etc/NX/nxserver –status returned something like this:

    NX> 162 Disabled service: nxserver.
    NX> 162 Disabled service: nxnode.
    NX> 161 Enabled service: nxd.

    However, https://knowledgebase.nomachine.com/AR07Q01037 doesn’t appear to apply to Mac.

    Running /etc/NX/nxserver –restart would make something like “NX> 111 New connections to NoMachine server are enabled.” appear at the top of the aforementioned status command, but I still couldn’t get logged in, and the player would prompt me for a username and password all along anyway.

    I gave up and ran the installer from the package again to resolve the issue, but I suspect rebooting would resolve this problem (as usual, I can’t test to find out because I’m remote when I encounter the problem), and I feel like there should be a simpler CLI workaround as well.

    #35850
    Carin
    Participant

    Hi nxmax,

    This is a different problem than the previous one. Disabled nxserver service usually means the problem is related with processes, the nxserver may crash, may not be properly initialized or something with access rights may be broken, so we will need logs to find out what is causing the problem. We suggest you collect and send us server-side logs (https://knowledgebase.nomachine.com/DT11R00181) and we will queue them for investigation.

    Please send them directly to forum[at]nomachine[dot]com, adding the title of the topic to the email subject.

    #36107
    nxmac
    Participant

    Thank you for the link.  I have not seen the issue recur since the automatic upgrade to 7.7.4, but I will do this if it does.

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

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