1) Enable debug level on the problematic machine:
nxserver --debug --enable all |
2) Connect and reproduce the problem.
3) Create the log archive:
nxserver --debug --collect |
4) Collect client side logs (if requested)
5) Send logs to Support Team as e-mail attachment (keep the ticket ID in the subject).
6) Restore Informational log level:
nxserver --debug --disable all |
TIP |
 |
|
|
When the problem is easily reproducible or if the Support Team requested that, you may clean the logs before starting the procedure above to collect them: |
nxserver --logrotate |
Command 'nxserver --debug --enable' allows to gather debug logs for all components: nxserver, nxnode, nxwebplayer/client and the display agent. Execute it on the machine where the problem occurs.
This command edits the server.cfg file and sets: SessionLogLevel 7 WebSessionLogLevel 7
It also edits node.cfg and sets: SessionLogLevel 7 SessionLogClean 0
NoMachine server and services are not restarted. Old sessions continue to run. The debug settings will apply only to new sessions.
First Step: Enable Debug Level on the Problematic Host |
sudo /etc/NX/nxserver --debug --enable all |
If you are the root user, run the command above without 'sudo'.
To enable debug on Windows, open a CMD console as administrator and move to the 'bin' folder under the NoMachine installation, e.g:
cd %ProgramFiles(x86)%\NoMachine\bin |
nxserver --debug --enable all |
TIP |
 |
|
|
Depending on the problem, it could be useful to enable debug for a specific target only. This is in general specified by the Support Team when needed. Multiple targets can be specified in a comma-separated list: |
nxserver --debug --enable server,node |
nxserver --debug --enable webplayer |
nxserver --debug --enable agent |
|
Second Step: Connect and Reproduce the Problem |
|
The debug level applies to new sessions only: create a new session and try to reproduce the problem.
TIP |
 |
|
|
If client side logs are also requested, be sure that the Don't delete log files on exit checkbox is selected in the client user's interface in the Settings -> Player -> Security panel on the end-user's computer. |
In case of web sessions, if browser's side logs are also requested, please follow instructions from the guide to collect logs manually: https://www.nomachine.com/DT11R00181 - Collect and send client side logs, for browsers. |
Third Step: Create the Log Archive |
|
Once the problem is reproduced, collect logs and generate the log archive to be sent to the Support Team.
sudo /etc/NX/nxserver --debug --collect |
If you are the root user, run the command above without 'sudo'.
The log archive is named as: NoMachine-log-<timestamp>.zip (e.g. NoMachine-log-2018.09.27-11.44.01.zip) and stored in: /usr/NX/var/log/archives or /Library/Application Support/NoMachine/var/log/archives on Linux and Mac respectively.
cd %ProgramFiles(x86)%\NoMachine\bin nxserver --debug --collect |
The log archive is named as: NoMachine-log-<timestamp>.zip (e.g. NoMachine-log-2018.09.27-11.44.01.zip) and stored in: %PROGRAMDATA%/NoMachine/var/log/archives on Windows 10, 8.x, 7 and Vista or in Documents and Settings/All Users/NoMachine/var/log/archives Windows XP.
Fourth Step: Collect Client Side Logs (if requested) |
|
Be sure that the client has been launched with the 'Don't delete log files on exit' option enabled in Settings -> Player -> Security. Otherwise the client logs will be missing or only partial.
On the user's computer, create a compressed archive of the .nx directory in the user's home.
sudo tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - path_to_user_home/.nx | gzip -c nxdir.tar.gz |
If you are the owner of the user's home, execute command above without 'sudo'.
TIPS |
 |
|
|
I |
If UserNXDirectoryPath is set in node.cfg, the .nx directory is created under a directory named as username in the path specified by such key.
Use this path in command above to create the log archive.
|
II |
When the users' home directories are NFS mounted and the squash_root option is set in NFS, add the "-u $user" to command: |
sudo -u USERNAME tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - path_to_user_home/.nx | gzip -c nxdir.tar.gz |
|
On Mac, navigate with the Finder till the .nx directory. To reduce the size of the archive, remove cache, images and recording sub-directories under .nx before creating the compressed folder.
Compress this folder: control-click or right-click the folder and then choose 'Create Archive' from the pop-up menu.
On Windows the .nx folder is hidden. To find it, write the following in the address bar or the file browser:
%USERPROFILE%\.nx
Otherwise navigate through the computer folder till the user's home and digit .nx in the navigation toolbar to reach it. Path can be similar to: C:/Users/nomachine/.nx
To reduce the size of the archive, remove cache, images and recording sub-directories under .nx before creating the compressed folder.
Fifth Step: Send Logs to Support Team |
|
Send via e-mail to the Support Team (as e-mail attachment): a) the NoMachine-log archive from the server side b) the compressed .nx directory from the user's home on his/her computer (if requested)
Please be sure to include ID of the enquiry in the subject of your e-mail to Support Team!
If the size of the log archive doesn't allow to send it by email, inform the Support Team who may provide an upload space for that.
Sixth Step: Restore Informational Level (Disable Debug Level) |
|
Once logs have been retrieved, it's advisable to restore the Informational Log level to reduce the size of logs that will be printed.
sudo /etc/NX/nxserver --debug --disable all |
cd %ProgramFiles(x86)%\NoMachine\bin nxserver --debug --disable all |
The 'nxserver --debug --collect' procedure allows also to run custom scripts for including the output of specific command (e.g. run nxserver --list, --history, --nodelist etc ...).
Place the custom debug script in the NoMachine installation dir/scripts/log/ directory and follow the same procedure described in the paragraph above.
The 'nxserver --debug --collect' procedure will set correct permissions to the custom script and execute it before collecting logs as usual.
It's possible to clean up log files before proceeding to set debug level, reproduce the problem and collect the logs. This will help to reduce the size of logs and focus on the problem (if easily reproducible).
To do that, force the rotation of NoMachine logs by executing:
sudo /etc/NX/nxserver --logrotate |
If you are the root user, run the command above without 'sudo'.
cd %ProgramFiles(x86)%\NoMachine\bin nxserver --logrotate |
Rotated files are saved in the NoMachine var/log/logrotate directory: /usr/NX/var/log on Linux %PROGRAMDATA%/NoMachine/var/log on Windows /Library/Application Support/NoMachine/var/log on macOS and named as: nxserver.log-user for log archive from user's home/.nx nxserver.log for log archive from NoMachine's var/log/
|