Configure Error Logging for Application or System Web Server

Updated Aug 29, 2023

Reported In

Hardware

  • Industrial Controller
  • CompactRIO Controller

Software

  • LabVIEW

Issue Details

My Application Web Server or System Web Server is not functioning properly. How do I generate the error information to help debug issues with my Web Server? 

Solution

Both the Application Web Server and System Web Server are capable of generating error information to a log file. This error information is useful for diagnosing potential issues with your Web Server. 

Use the following steps to configure your NI Web Server for error logging on either Windows or Real-Time targets.
 

Windows NI Web Server Error Generation Setup

  1. Locate the configuration file for your Web Server.
 
Application Web Server:
C:\Program Files\National Instruments\Shared\NI WebServer\NIWebAppServer.conf

System Web Server:
C:\Program Files\National Instruments\Shared\NI WebServer\NISystemWebServer.conf
 
  1. ​Add the error logging property to the configuration file.
    1. Open the configuration file in a text editor.
    2. Add the property level=3 to Line 5 to specify error verbosity.  

      Before:
      ErrorLog ApplicationWebServer.log, backup=1, size=1M
      ErrorLog SystemWebServer.log, backup=1, size=1M


      After:
      ErrorLog ApplicationWebServer.log, backup=1, size=1M, level=3
      ErrorLog SystemWebServer.log, backup=1, size=1M, level=3
  1. Save and close the configuration file after making these modifications.
  2. Restart the machine so the Server will be restarted and will use the new error logging configuration properties.


Your Web Server should now be configured to log error information to the corresponding log file located at the same directory as the Web Server and configuration file. 

Application Web Server:
C:\Program Files\National Instruments\Shared\NI WebServer\ApplicationWebServer.log

System Web Server:
C:\Program Files\National Instruments\Shared\NI WebServer\SystemWebServer.log
 

NI Linux RT -  NI Web Server Error Generation Setup

  1. Connect over FTP to your controller and locate the configuration file for your Web Server.

RT Application Web Server:
.\etc\natinst\appweb\NIWebAppServer.conf

RT System Web Server:
.\etc\natinst\appweb\NISystemWebServer.conf
  1. Transfer a copy of the configuration file over FTP to your desktop and open the file using the text editor.
  2. Modify the configuration file based on the type of web server. 
 
RT Application Web Server: ​
  1. On line 5 of the configuration file there should be line with the following text:
    ErrorLog ApplicationWebServer.log, backup=1, size=1M
  2. Add the error verbosity property, level=3, to the end of this line. The end result should be the following:
 ErrorLog ApplicationWebServer.log, backup=1, size=1M, level=3
  1. If the Error Log properties are not shown on line 5, then they will need to be added. The final layout of the file should look similar to the following: 
 
# NI Web Application server configuration file.
#
# Global Directives
#
ErrorLog ApplicationWebServer.log, backup=1, size=1M, level=3
LoadModulePath ".:./..:./modules"

 
RT System Web Server:
  1. On line 5 of the configuration file there should be line with the following text:
ErrorLog RTWebWebServer.log, backup=1, size=1M
  1. Add the error verbosity property, level=3, to the end of this line. The end result should be the following:
ErrorLog ApplicationWebServer.log, backup=1, size=1M, level=3
 
  1. Restart the controller so that the Server will be restarted and will use the new error logging configuration properties.

Your Server should now be configured to log error information to the corresponding log file located at the same directory as the Server and configuration file. 

RT Application Web Server:
\files\etc\natinst\appweb\ApplicationWebServer.log

RT System Web Server:
\files\etc\natinst\appweb\RTWebServer.log