HOW TO ENABLE AND COLLECT DEBUG LOGS FOR SUPPORT REQUESTS
These instructions apply to NoMachine v.5.
For NoMachine v. 6 please use:
https://www.nomachine.com/DT10O00163
and for previous versions:
NoMachine v. 4: https://www.nomachine.com/DT04M00076
NX 3.5.0: https://www.nomachine.com/AR12I00100
Index
Click on any of the following links to reach the appropriate section:
STEPS TO COLLECT AND SEND SERVER SIDE LOGS
Collecting server side logs requires to make the following operations on the NoMachine server host (in case of a multinode environment also on the remote node where the problem occurs):
- Set debug log level manually.
- Reproduce the problem.
- Create the compressed archives of logs.
- Send the archives to NoMachine Support Team by e-mail or ask Support to provide a space for uploading logs if size is too big for an e-mail attachment.
These operations are described in details in the next paragraphs.
1. Set debug log level manually
1.1. Edit the /usr/NX/etc/server.cfg file. Uncomment and set the following:
SessionLogLevel 7
1.2. Edit the /usr/NX/etc/node.cfg file. Uncomment and set the following:
SessionLogLevel 7
and:
SessionLogClean 0
1.3. If you have a Cloud Server installed and the problem affects sessions by the web:
edit /usr/NX/etc/cloud.cfg. Uncomment and set the following:
SessionLogLevel 7
IMPORTANT:It's NOT necessary to restart the server or the NoMachine services, except if this has been requested by the Support Team.
2. Reproduce the problem
2.1. Launch NoMachine client on the user's computer, click on Settings -> Privacy and select the 'Don't delete log files on exit' checkbox.
2.2. Connect to the NoMachine server and reproduce the problem.
Once reproduced:
- collect server side logs as explained at point 3. of this section.
- collect client side logs by following instructions appropriate to the operating system of the user's computer: for Linux, Mac or for Windows.
3. Create the compressed archives of logs
3.1. Create a compressed archive (tar.gz) archive from command line of the /usr/NX/var/log directory. Do it from a console by executing from command line:
$ sudo tar cvfz NoMachine-log.tar.gz /usr/NX/var/log
3.2. Create a compressed archive of the .nx directory in the user's home
Replace <path to user's home> in the command by the full path to the home of the user who is experiencing the problem.
a) $ tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
If you are not the owner of this user's home, run the command with sudo:
b) $ sudo tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
NOTES:
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:
<UserNXDirectoryPath>/<username>/.nx
Use this path in commands a) and b) above.
ii) When the users' home directories are NFS mounted and the squash_root option is set in NFS, add the "-u $user" to command b):
sudo -u <user's name> tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
4. Send the archives to NoMachine Support Team by e-mail
Send the log archives as e-mail attachment. Please be sure to include ID of the inquiry to the subject of your e-mail.
1. Set debug log level manually.
1.1. Edit the /Applications/NoMachine.app/Contents/Frameworks/etc/server.cfg file. Uncomment and set the following:
SessionLogLevel 7
1.2. Edit the/Applications/NoMachine.app/Contents/Frameworks/etc/node.cfg file. Uncomment and set the following:
SessionLogLevel 7
and:
SessionLogClean 0
1.3. If you have a Cloud Server installed and the problem affects sessions by the web:
edit the /Applications/NoMachine.app/Contents/Frameworks/etc/cloud.cfg file. Uncomment and set the following:
SessionLogLevel 7
2. Reproduce the problem
2.1. Launch NoMachine client on the user's computer, click on Settings -> Privacy and select the 'Don't delete log files on exit' checkbox.
2.2. Connect to the NoMachine server and reproduce the problem.
Once reproduced:
- collect server side logs as explained at point 3. of this section.
- collect client side logs by following instructions appropriate to the operating system of the user's computer: for Linux, Mac or Windows.
3. Create the compressed archives of logs
3.1. Create a compressed archive of the /Library/Application Support/NoMachine/var/log directory
Navigate with the Finder till the /Library/Application Support/NoMachine/var/log directory. Compress this folder: control-click or right-click the folder and then choose 'Create Archive' from the pop-up menu.
As an alternative, you may create a tar.gz archive from command line. Run in a console:
$ cd "/Library/Application Support/NoMachine/var/"
$ sudo tar cvfz NoMachine-log.tar.gz log
3.2. Create a compressed archive of the .nx directory in the user's home
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.
As an alternative, you may create a tar.gz archive from command line. Run in a console:
$ tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
If you are not the owner of this user's home, run the command with sudo:
$ sudo tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
4. Send the archives to NoMachine Support Team by e-mail
Send the log archives as e-mail attachment. Please be sure to include ID of the enquiry in the subject of your e-mail.
1. Set debug log level manually
1.1. Edit the installationDirectory/NoMachine/etc/server.cfg.
Copy the server.cfg file in a temporary folder and open the file with an editor like WordPad. This is necessary for being able to edit the file.
Uncomment and set the following:
SessionLogLevel 7
Copy the modified server.cfg file to installationDirectory/NoMachine/etc/server.cfg. Administrative privileges are required.
1.2. Edit the installationDirectory/NoMachine/etc/node.cfg file.
Copy the installationDirectory/NoMachine/etc/node.cfg file in a temporary folder and open the file with an editor like WordPad. This is necessary for being able to edit the file. Uncomment and set the following:
SessionLogLevel 7
and:
SessionLogClean 0
Copy the modified node.cfg file to installationDirectory/NoMachine/etc/node.cfg. Administrative privileges are required.
1.3. If you have a Cloud Server installed and the problem affects sessions by the web:
copy the installationDirectory/NoMachine/etc/cloud.cfg file in a temporary folder and open the file with an editor like WordPad. This is necessary for being able to edit the file. Uncomment and set the following:
SessionLogLevel 7
Copy the modified cloud.cfg file to installationDirectory/NoMachine/etc/cloud.cfg. Administrative privileges are required.
2. Reproduce the problem
2.1. Launch NoMachine client on the user's computer, click on Settings -> Privacy and select the 'Don't delete log files on exit' checkbox.
2.2. Connect to the NoMachine server and reproduce the problem.
Once reproduced:
- collect server side logs as explained at point 3. of this section.
- collect client side logs by following instructions appropriate to the operating system of the user's computer: for Linux, Mac or for Windows.
3. Create the compressed archives of logs
3.1. Create a compressed archive of the NoMachine /var/log directory
The NoMachine /var/log directory is:
%PROGRAMDATA%/NoMachine/var/log on Windows Vista, 7, 8, 8.1 and 10.
Documents and Settings/All Users/NoMachine/var/log on Windows XP.
To compress it, right-click the file or folder, point to Send To, and then click Compressed (zipped) Folder.
3.2. Create a compressed archive of the .nx directory in the user's home.
The .nx folder is hidden. To find it, write the following in the address bar or the file browser:
%USERPROFILE%\.nx
As an alternative, you may navigate through the computer folder till the user's home and digit .nx in the navigation toolbar to reach this hidden folder.
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.
Then compress the .nx directory: right-click the file or folder, point to Send To, and then click Compressed (zipped) Folder.
4. Send the archives to NoMachine Support Team by e-mail
Send the log archives as e-mail attachment. Please be sure to include ID of the enquiry in the subject of your e-mail.
To collect logs for debugging an issue occurring on a remote node in a multinode environment, follow instructions above according to the operating system running on the remote node.
STEPS TO COLLECT AND SEND CLIENT SIDE LOGS
When the connection terminates with an error, the client shows a dialog with a short error message and asks to save logs of that problem into a directory. In this case:
- Save client logs when prompted to do it.
- Compress the directory containing logs.
- Send the archive to NoMachine Support Team by e-mail.
When the connection doesn't terminate with an error but shows an unexpected behavior to be investigated (e.g. black or frozen screen, wrong keyboard mapping etc ...) the client cannot issue the dialog to save error logs. In this case, or if requested by the NoMachine Support Team, you have to retrieve logs manually as explained in the next paragraphs.
Collecting client side logs manually requires to make the following operations on the user's machine from which the connection is started:
- Launch NoMachine client on the user's computer, click on Settings -> Privacy and select the 'Don't delete log files on exit' checkbox.
- Connect to the server and reproduce the problem.
- Compress the user's home/.nx directory containing logs.
- Send the compressed logs archive to NoMachine Support Team by e-mail.
5.1. Create a compressed archive of the .nx directory in the user's home
Run from a console:
$ tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
If you are not the owner of this user's home, run the command with sudo:
$ sudo tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
6.1. Create a compressed archive of the .nx directory in the user's home
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.
As an alternative, you may create a tar.gz archive from command line. Run in a console:
$ tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
If you are not the owner of this user's home, run the command with sudo:
$ sudo tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - <path to user's home>/.nx | gzip -c >nxdir.tar.gz
7.1. Create a compressed archive of the .nx directory in the user's home
The .nx folder is hidden. To find it, write the following in the address bar or the file browser:
%USERPROFILE%\.nx
As an alternative, you may navigate through the computer folder till the user's home and digit .nx in the navigation toolbar to reach this hidden folder.
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.
Then compress the .nx directory: right-click the file or folder, point to Send To, and then click Compressed (zipped) Folder.
7.2. Provide the nxtrace.log file (if present)
The nxtrace.log file is generated only in case of a sudden termination of any of the NoMachine programs. It's stored in the Machine /var/log directory (see par. 3.1. for different locations depending on the Windows version).
You may also search it on your computer by using the Windows tool: use the Search box on the Start menu to find programs, type there nxtrace.log to locate this file.
Configuration of the session (namely the connection file .nxs) is stored by default in /Documents/NoMachine.
To verify where the session files are effectively saved, run the NoMachine client and click on Settings ->Folder. Check path set for 'Connections and recordings' .
Please refer to instructions here:
http://www.nomachine.com/AR04M00843
Please refer to instructions here:
https://www.nomachine.com/AR07N00897
OTHERS
In many cases a core file debugged outside of the original environment doesn't provide all the necessary information. That's why it's important to gather the stacktrace onsite and send it to support for analysis.
Please refer to instructions here for debugging a core file onsite:
https://www.nomachine.com/AR09L00810
To know which application has generated the core, you may run on Linux:
file <corefile>
where <corefile> is the name of the core file.
Retrieve stacks automatically generated by the system.
Diagnostic reports are stored in:
a) ~/Library/Logs/DiagnosticReports
and
b) /Library/Logs/DiagnosticReports
Note that path a) and b) are different.
Stacks for NoMachine programs are prefixed with 'nx', retrieve them from directories a) and b) if any and send the diagnostic reports as e-mail attachment.
In case of a sudden termination, NoMachine programs generate on Windows the nxtrace.log file.
This file is placed in the following directory:
Windows Vista, 7, 8, 8.1, 10 -> %PROGRAMDATA%/NoMachine/var/log
Windows XP -> Documents and Settings/All Users/NoMachine/var/log
Otherwise you may search for nxtrace.log on your computer by using the Windows tool: use the Search box on the Start menu to find programs, type there nxtrace.log to locate this file.
Please refer to instructions here:
http://www.nomachine.com/AR09L00809
This applies to NoMachine Cloud Server and sessions run via browser.
In order to collect front-end logs for a web session, follow steps below.
1) Point your browser to the webplayer application and run it in debug mode:
https://<host:port>/nxwebplayer?log
For example: https://testdrive.nomachine.com:4443/nxwebplayer?log
2) Log-in to NoMachine and perform all steps requested to reproduce the problem.
3) Once the problem is reproduced, retrieve logs by typing in the browser's navigation bar:
https://<host:port>/nxwebplayer?getlog
E.g. https://testdrive.nomachine.com:4443/nxwebplayer?getlog
This will disconnect the session and display the logs page.
4) Click on the 'Download' button in the upper right corner of the page to download and save the log file.
5) Send the log file to NoMachine Support Team by e-mail.
Note: to clear logs point the browser's navigation bar to: https://<host:port>/nxwebplayer?clearlog
E.g. https://testdrive.nomachine.com:4443/nxwebplayer?clearlog
Please refer to instructions here:
https://www.nomachine.com/AR08M00857