can you tell us the macOS version you are connecting from and the distro of the Linux server that you are connecting to (you mentioned it in a duplicate topic you submitted), just so we have all the details?
In the meantime, on the Mac machine you can disable the nxserver from the command line.
sudo /etc/NX/nxserver --shutdown
sudo /etc/NX/nxserver --startmode manual
Check this article for further details. It also describes the manual procedure (by editing /Library/LaunchDaemons/com.nomachine.server.plist file) for advanced users.