Starting a Windows SAS® Web Application Service with Debug Logging
SAS web application services are responsible for the running of the various SAS web applications available on your platform. Examples of SAS web applications are SAS Studio, Visual Analytics and Customer Intelligence Studio.
If you have an active SAS middle-tier you will have at least one web application service, with the typical naming convention SASServer1_1. You may have more than one of these services depending on your deployment.
Often when these services are started, logging is presented on the services status within the following files:
However, there may be occasions where an unsuccessful attempt is made to start a service, and no detail has been sent to the above log files to aid troubleshooting. What you need is a log of events as the service is attempting to start, this tip details how to enable debug logging.
Start the Service as a Console Application
In the below example we will be starting the SASServer13_1 service.
Obtain the Service Start-up Command
1. On the Windows SAS Server, open “Services”:
2. Once open, search for the web application service in the list:
3. Right-click on the service --> Properties
4. Copy the contents of the “path to executable” command string to notepad or somewhere convenient for editing:
5. Make the following changes/additions to the “path to executable” command string:
a. Change “-s” to “-c” after the wrapper.exe call.
b. Add “wrapper.debug=true” to the end of the command.
The changes/additions have been highlighted below in the example command:
D:\SAS94\Lev1\Web\WebAppServer\SASServer13_1\bin\winx86_64\wrapper.exe -c D:\SAS94\Lev1\Web\WebAppServer\SASServer13_1\conf\wrapper.conf set.CATALINA_BASE=D:\SAS94\Lev1\Web\WebAppServer\SASServer13_1 "set.CATALINA_HOME=D:\Program Files\SASHome\SASWebApplicationServer\9.4\\tomcat-7.0.55.A.RELEASE" set.ARCH=winx86_64 set.INSTANCE_NAME=SASServer13_1 set.wrapper.ntservice.id=tcruntime-D-SAS94-Lev1-Web-WebAppServer-SASServer13_1 wrapper.debug=true
6. Open Windows Command Prompt with Administrative permissions.
7. Paste the amended “path to executable” command string into the Command Prompt window:
8. Press Return/Enter to execute the command.
You should now be presented with a live debug log of events whilst the service is attempting to start. The wrapper.log file previously mentioned in this tip will also populate with the same debug log information for later consumption.
For this example, our “path to executable” command contained an incorrect directory name:
wrapper | Classpath element, wrapper.java.classpath.3, does not exist: D:\Program Files\SASHome\SASWebApplicationServer\9.4\\tomcat-7.0.55.A.RELEASE\bin\bootstrap.jar
wrapper | Classpath element, wrapper.java.classpath.4, does not exist: D:\Program Files\SASHome\SASWebApplicationServer\9.4\\tomcat-7.0.55.A.RELEASE\bin\tomcat-juli.jar
After amending the directory in the “path to executable” command string, our service started successfully.