Troubleshooting Secure Sockets Problems

Overview

SPD Server supports use of the SAS logging facility for troubleshooting problems with secure sockets. The SAS logging facility is a framework that categorizes and filters log messages in SAS server and programming environments. It also writes log messages to various output devices. The SAS logging facility provides diagnostic information beyond that provided by SPD Server logging. We recommend that you reserve use of the logging facility for diagnosing problems, because the logging facility generates a lot of information.
The SAS logging facility is activated by creating an XML configuration that specifies the desired loggers and then by referencing this configuration file at server or program start-up. SPD Server supports the App.tk.tcp logger and App.tk.eam.ssl logger for monitoring secure sockets activity on the client and server. It also supports the Encryption loggers described in Encryption in SAS.
There are two scenarios for troubleshooting communication between the SASSPDS client and SPD Server:
  • communication between the SASSPDS client and the SPDSSERV process to establish the LIBNAME connection.
  • communication between the SASSPDS client and the SPDSBASE process after the LIBNAME connection is established.
To enable diagnostic logging for the first scenario, you must configure SPDSSERV logging and SAS logging. To enable diagnostic logging for the second scenario, you must configure SPDSBASE logging and SAS logging. This is accomplished by creating separate XML configuration files for the SPDSSERV process, SPDSBASE processes, and the SAS session. These log files use the same loggers, but specify a different FileNamePattern to distinguish the log files that they create. The logging facility enables messages to be filtered on the following sensitivity levels: TRACE, DEBUG, INFO, WARN, ERROR, and FATAL. To monitor secure sockets activity, specify the loggers with a TRACE setting.

Configuring SPDSSERV Logging

  1. Create a logging configuration file named logcfgspdsserv.xml. In the configuration file, specify the App.tk.tcp and App.tk.eam.ssl loggers. Specify the SPDSSERV process in the FileNamePattern.
    Here is an example of a logconfig.xml file that specifies the App.tk.tcp and App.tk.eam.ssl loggers and specifies a FileNamePattern for the SPDSSERV process:
    <?xml version="1.0"?>
    <logging:configuration xmlns:logging="http://www.sas.com/xml/logging/1.0/">
       <!-
          Configure a FileAppender instance for our server log.
       ->
       <appender name="RootAppender" class="FileAppender">
          <!-
             This is where we want the SPD Server log files to be created and
             their template name.  The name will be spdsbase_log4sas_YYYY-MM-DD_<PID>.log
          ->
          <param name="FileNamePattern" value="/u/foobar/spds53/spdsserv_log4sas_%d_%S{jobid}.log"/>
          <param name="Append" value="false"/>
          <param name="ImmediateFlush" value="true"/>
          <!-
             We want to use this as the message layout
          ->
        <layout>
            <param name="conversionpattern" value="%r %d{HH:mm:ss.SSS} thr[%t] %15.15F:%-6L - %m"/>
        </layout>
       </appender>
       <!-
          Logging is enabled for events emitted in the "App.tk.tcp" TKITCP extension.
          Logging levels available are Fatal, Error, Warn, Info, Debug, and Trace.
          The logging level enabled is Trace.
       ->
       <logger name="App.tk.tcp">
          <level value="trace"/>
       </logger>
       <logger name="App.tk.eam.ssl">
           <level value="trace">
       </logger>
      
       <root>
          <appender-ref ref="RootAppender"/>
       </root>
    </logging:configuration> 
  2. Modify the SPD Server start-up script to add the path to the logcfgspdsserv.xml file as a parameter to the SPDSSERV process as follows. For UNIX, modify the site/rc.spds script. For Windows, modify the site\spdsserv.bat file. The LOGCONFIGLOC option specifies the path to the configuration file.
    spdsserv -logconfigloc <full-path>/logcfgspdsserv.xml --
    Note: The LOGCONFIGLOC option must be the first parameter in the start-up script. The option value must include the double hyphens (--).
A log file will be created for the SPDSSERV process in directory /u/foobar/spds53. The log file will be named spdsserv_log4sas_YYYY-MM-DD_<PID>.log.

Configuring SPDSBASE Logging

  1. Create a logging configuration file named logcfgspdsbase.xml. In the configuration file, specify the App.tk.tcp and App.tk.eam.ssl loggers and a FileNamePattern for the SPDSBASE process. The file can have the same content as the logcfgspdsserv.xml file, except for the FileNamePattern.
    Here is an example of how you might specify the FileNamePattern:
    param name="FileNamePattern" value="/u/foobar/spds53/spdsbase_log4sas_%d_%S{jobid}.log"
  2. Export the path to the configuration file with the SPDSLOG4SASCONFIGLOC= environment variable. For a UNIX server, modify the site/rc.spds script to add the SPDSLOG4SASCONFIGLOC= environment variable. For a Windows server, modify the site\spdsserv.bat file. Specify the SPDSLOG4SASCONFIGLOC= environment variable as follows:
    export SPDSLOG4SASCONFIGLOC=<full-path>/logcfgspdsbase.xml
A log file will be created for each SPDSBASE process in directory /u/foobar/spds53. The log file will be named spdsbase_log4sas_YYYY-MM-DD_<PID>.log.

Configuring SAS Logging

  1. Create a logging configuration file named logcfgsas.xml. In the configuration file, specify the App.tk.tcp and App.tk.eam.ssl loggers and a FileNamePattern for the SAS session. The file can have the same content as the logcfgspdsserv.xml file, except for the FileNamePattern.
    Here is an example of how you might specify the FileNamePattern:
    param name="FileNamePattern" value="/u/foobar/spds53/sas_log4sas_%d_%S{jobid}.log"
  2. Specify the -LOGCONFIGLOC option in the SAS start-up command as follows:
    -logconfigloc <full-path>/logcfgsas.xml
A log file will be created for the SAS process in directory /u/foobar/spds53. The log file will be named sas_log4sas_YYYY-MM-DD_<PID>.log.
For more information about the SAS logging facility, see SAS Logging: Configuration and Programming Reference.
Last updated: February 3, 2017