NoMachine Support

Your questions answered

Knowledge Base

Searching in: Documents
Filter the search results
Version:
Last update:
Searching in: Documents
ID: DT10O00163
Version: NoMachine 6
Added on: 2017-11-15
Last update: 2018-07-19
How to gather debug logs for support requests
Table of Contents
COLLECT AND SEND SERVER SIDE LOGS
1. How to Collect Server Side Logs
1.1. Server on Linux
1.2. NoMachine Terminal Server Node (Linux)
1.3. Server on Mac
1.4. Server on Windows
COLLECT AND SEND CLIENT SIDE LOGS
2. How to Collect Client Logs from Users' Devices
2.1. Client on Linux
2.2. Client on Mac
2.3. Client on Windows
2.4. Client on Android Tablets/Smartphones
2.5. Client on iOS Devices
2.6. Browser (Web Sessions)
3. How to Locate the Connection Settings File (.nxs)
OTHERS
4. How to Gather a Stacktrace
4.1. On Linux
4.2. On Mac
4.3. On Windows
5. How to Debug a CPU Consuming Process on Linux
6. Troubleshooting LDAP and PAM Issues on Linux


COLLECT AND SEND SERVER SIDE LOGS
1. How to Collect Server Side Logs

Server side logs have to be collected on the NoMachine server host where the problem occurs:

I Standalone NoMachine Servers

Follow instructions for the appropriate Operating System and execute them on the NoMachine Server host.

II Multi-server environments

Depending on the problem, it may affect the main Cloud Server or any of the federated servers. Follow instructions for the appropriate Operating System and execute them on the affected host(s).

III Multi-node environments (ETS + TSN)

Depending on the problem, it may affect the Enterprise Terminal Server or any of the Terminal Server Nodes Follow instructions for the appropriate Operating System and execute them on the affected host(s).



These are the general steps to collect and send logs:
- 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.



1.1. Server on Linux

Step 1 - Set debug level in server.cfg
Edit /usr/NX/etc/server.cfg, uncomment and set the following:
SessionLogLevel 7

If the problem affects web sessions, set also:
WebSessionLogLevel 7

Step 2 - Set debug level in node.cfg
Edit /usr/NX/etc/node.cfg, uncomment and set the following:
SessionLogLevel 7
and:
SessionLogClean 0

TIP
It's NOT necessary to restart the server or the NoMachine services, except if this has been requested by the Support Team.

Step 3 - Reproduce the problem
If also client side logs are requested, ensure that the client on the user's computer has the 'Don't delete log files on exit' option checked in the GUI Settings ('Privacy' panel), or that the web session is launched in debug mode (see detailed instructions in paragraphs dedicated to collect client side logs).

Connect to the NoMachine server and reproduce the problem.

Once reproduced:
- collect server side logs.
- collect client side logs if requested.

Step 4 - Create the compressed server side logs archive
Create a compressed tar.gz archive of the /usr/NX/var/log directory:

$ sudo tar cvfz NoMachine-log.tar.gz /usr/NX/var/log

Step 5 - Send the server logs archive to the Support Team

Send the logs archive as e-mail attachment. Please be sure to include ID of the inquiry to the subject of your e-mail or request for a temporary upload space if the size of the archive is too large.

1.2. NoMachine Terminal Server Node (Linux)

Step 1 - Set debug level in server.cfg
Edit /usr/NX/etc/server.cfg, uncomment and set the following:
SessionLogLevel 7

Step 2 - Set debug level in node.cfg
Edit /usr/NX/etc/node.cfg, uncomment and set the following:
SessionLogLevel 7
and:
SessionLogClean 0

Step 3 - Reproduce the problem
If also client side logs are requested, ensure that the client on the user's computer has the 'Don't delete log files on exit' option checked in the GUI Settings ('Privacy' panel), or that the web session is launched in debug mode (see detailed instructions in paragraphs dedicated to collect client side logs).

Connect to the NoMachine server and reproduce the problem.

Once reproduced:
- collect logs on the Terminal Server Node host.
- collect client side logs if requested.

Step 4 - Create the compressed server side logs archive
Create a compressed tar.gz archive of the /usr/NX/var/log directory:

$ sudo tar cvfz NoMachine-TSN-log.tar.gz /usr/NX/var/log

Step 5 - Send the Terminal Server Node logs archive to the Support Team

Send the logs archive as e-mail attachment. Please be sure to include ID of the inquiry to the subject of your e-mail or request for a temporary upload space if the size of the archive is too large.



1.3. Server on Mac

Step 1 - Set debug level in server.cfg
Edit /Applications/NoMachine.app/Contents/Frameworks/etc/server.cfg, uncomment and set the following:
SessionLogLevel 7

If the problem affects web sessions, set also:
WebSessionLogLevel 7

Step 2 - Set debug level in node.cfg
Edit /Applications/NoMachine.app/Contents/Frameworks/etc/node.cfg, uncomment and set the following:
SessionLogLevel 7
and:
SessionLogClean 0

TIP
It's NOT necessary to restart the server or the NoMachine services, except if this has been requested by the Support Team.

Step 3 - Reproduce the problem
If also client side logs are requested, ensure that the client on the user's computer has the 'Don't delete log files on exit' option checked in the GUI Settings ('Privacy' panel), or that the web session is launched in debug mode (see detailed instructions in paragraphs dedicated to collect client side logs).

Connect to the NoMachine server and reproduce the problem.

Once reproduced:
- collect server side logs.
- collect client side logs if requested.

Step 4 - Create the compressed server side logs archive
Create a compressed tar.gz 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, create the archive from command line:

$ cd "/Library/Application Support/NoMachine/var/"
$ sudo tar cvfz NoMachine-log.tar.gz log

Step 5 - Send the server logs archive to the Support Team

Send the logs archive as e-mail attachment. Please be sure to include ID of the inquiry to the subject of your e-mail or request for a temporary upload space if the size of the archive is too large.

1.4. Server on Windows

Step 1 - Set debug level in server.cfg
Copy the InstallationDirectory/NoMachine/etc/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.

Edit the copy of the server.cfg file, uncomment and set the following:
SessionLogLevel 7

If the problem affects web sessions, set also:
WebSessionLogLevel 7

Copy the modified server.cfg file to InstallationDirectory/NoMachine/etc/server.cfg. Administrative privileges are required.

Step 2 - Set debug level in node.cfg
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.

Edit the copy of the node.cfg 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.

TIP
It's NOT necessary to restart the server or the NoMachine services, except if this has been requested by the Support Team.

Step 3 - Reproduce the problem
If also client side logs are requested, ensure that the client on the user's computer has the 'Don't delete log files on exit' option checked in the GUI Settings ('Privacy' panel), or that the web session is launched in debug mode (see detailed instructions in paragraphs dedicated to collect client side logs).

Connect to the NoMachine server and reproduce the problem.

Once reproduced:
- collect server side logs.
- collect client side logs if requested.

Step 4 - Create the compressed server side logs archive
Create a compressed archive of the NoMachine's /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.

Step 5 - Send the server logs archive to the Support Team

Send the logs archive as e-mail attachment. Please be sure to include ID of the inquiry to the subject of your e-mail or request for a temporary upload space if the size of the archive is too large.

COLLECT AND SEND CLIENT SIDE LOGS
2. How to Collect Client Logs from Users' Devices

TIP
When the connection terminates with an error, the client shows a dialog with a short error message and allows 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 computer from which the connection is started:
- launch the NoMachine User Interface on the user's computer from Programs or Menu
- click on Settings to open Player preferences and click on the Privacy tab
- select the Don't delete log files on exit checkbox
- Connect to the server and reproduce the problem. - ompress the user's home/.nx directory containing logs.
- Send the compressed logs archive to NoMachine Support Team by e-mail.

If the user instead runs sessions via web, launch the web session in debug mode as explained in the dedicated paragraph.



2.1. Client on Linux

Create a compressed tar.gz archive of the .nx directory in the user's home on his/her computer:

$ tar -cvp --exclude 'cache*' --exclude 'images' --exclude 'temp' -f - /.nx | gzip -c >nxdir.tar.gz
or, ff 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 - /.nx | gzip -c >nxdir.tar.gz


2.2. Client on Mac

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 - /.nx | gzip -c >nxdir.tar.gz
or, ff 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 - /.nx | gzip -c >nxdir.tar.gz


2.3. Client on Windows

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.

Provide also the nxtrace.log 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:
%PROGRAMDATA%/NoMachine/var/log on Windows Vista, 7, 8, 8.1, 10 or
Documents and Settings/All Users/NoMachine/var/log on Windows XP.

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.



2.4. Client on Android Tablets/Smartphones

Please refer to instructions here:
https://www.nomachine.com/AR04M00843



2.5. Client on iOS Devices

Please refer to instructions here:
http://www.nomachine.com/AR07N00897





2.6. Browser (Web Sessions)

Logs are stored in the browser's local storage, so the user's browser needs to have Local Storage support. If yes:

Step 1 - Point your browser to the webplayer application and run it in debug mode:
https://server:port/nxwebplayer?logging=start

For example:
https://testdrive.nomachine.com:4443/nxwebplayer?logging=start

Step 2- Log-in to NoMachine and perform all steps requested to reproduce the problem.

Once the problem is reproduced, retrieve logs by typing in the browser's navigation bar:
https://server:port/nxwebplayer?logging=get

For example:
https://testdrive.nomachine.com:4443/nxwebplayer?logging=get

This will disconnect the session and display the logs page.

Step 4 -Click on the 'Download' button in the upper right corner of the page to download and save the log file.

Step 5 - Send the log file to NoMachine Support Team by e-mail. Please be sure to include ID of the enquiry in the subject of your e-mail.

For turning off the debug mode, type in the browser's navigation bar the action to stop the debug mode, for example: https://testdrive.nomachine.com:4443/nxwebplayer?logging=stop



3. How to Locate the Connection Settings File (.nxs)

Configuration of the client's 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'.



OTHERS
4. How to Gather a Stacktrace

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 the Support Team for analysis.



4.1. On Linux

Please refer to instructions here for debugging a core file onsite:
https://www.nomachine.com/AR09L00810

To know which application has generated the core, run from a console:

file PATH_TO_CORE_FILE


4.2. On Mac

On Mac you need to reetrieve 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.



4.3. On Windows

In case of a sudden termination, NoMachine programs generate on Windows the nxtrace.log file.

This file is placed in the following directory:
%PROGRAMDATA%/NoMachine/var/log on Windows Vista, 7, 8, 8.1, 10
Documents and Settings/All Users/NoMachine/var/log on Windows XP.

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.



5. How to Debug a CPU Consuming Process on Linux

Please refer to instructions here:
https://www.nomachine.com/AR09L00809



6. Troubleshooting LDAP and PAM Issues on Linux

Please refer to instructions here:
https://www.nomachine.com/AR08M00857