Automic Workload Automation

Expand all | Collapse all

Activating AWI↔AE tracing

  • 1.  Activating AWI↔AE tracing

    Posted 11-06-2017 04:40 AM

    The documentation page on preparing log files for error reporting states that it is possible to activate tracing of the communication between the AWI and the AE server:

    AE API tracing        

    This logs the communication between AE and AWI from the AWI point of view.

    How: In theuc4config.xml, set the trace element parameters to
    <trace count="10" xml="3"></trace>

    Attention: You should contact your AE administrators to request the appropriate log level if AE server side tracing is requested

    Note:  This is the same protocol that the AE Rich Client uses to talk to AE  backend, which is why this is sometimes called the "Client Trace."

    ...
    1. Collect the following information and send it to Automic support:
    • All Tomcat log files. All AWI log files are stored in the "logs" folder of the Tomcat web application server. The log files are named<Host_Name>_ECC_Log.##.TXTand trace files are named<Host_Name>_ECC_TRACE.##.TXT. The file number (##) is incremented, with 00 being the current file.

    I have followed the instructions, but the only files I see in the Tomcat logs directory are the main AWI log and the corresponding “FRAMEWORK” log. I see no “TRACE” file. Has anyone been able to activate AWI↔AE tracing?



  • 2.  Activating AWI↔AE tracing

    Posted 11-06-2017 05:43 AM

    It seems a bit odd that there is no way to specify the pattern for naming AWI↔AE trace files. With the Java User Interface, one specifies the file name pattern in the content of the trace element in the uc4config.xml file, e.g.,

    <trace count="10" xml="3">UCDJ_TRC_##.TXT</trace>

    However, with the AWI, one is apparently supposed to enable tracing simply by changing the xml attribute, but leaving the content of the trace element empty. E.g.,

    <trace count="10" xml="3"></trace>

    How does the AWI know what pattern to use for naming trace files?

    I usually customize the logback.xml and framework-logging.xml files so that the log file names are a bit different than the default values. E.g., in the file and fileNamePattern elements, I change “ECC” to “AWI”. It occurred to me that the trace file name might be hard-coded somewhere in the app, and that the AWI might therefore expect these elements in the XML config files not to be changed. Operating on this assumption, I set the values back to their defaults and restarted Tomcat. Unfortunately, this did not help. The trace file still does not appear.



  • 3.  Activating AWI↔AE tracing

    Posted 11-06-2017 06:15 AM
    Just a guess: could there be the need to restart the tomcat?


  • 4.  Activating AWI↔AE tracing

    Posted 11-06-2017 06:45 AM
    Yes, and I did that.


  • 5.  Activating AWI↔AE tracing

    Posted 11-06-2017 07:38 AM
    Out of couriosity I tested it with my ECC (V11.2.5) - same result, no Trace file appeared.

    from the defaults I changed:
    changed logback.xml: <root level="DEBUG">
    and uc4config.xml:     <trace count="10" xml="3"></trace>






  • 6.  Activating AWI↔AE tracing

    Posted 11-06-2017 08:02 AM
    For what it’s worth, I also tried putting a file name pattern in between the opening and closing tags of the trace element, as one does with the Java User Interface. Again, no trace file was written.


  • 7.  Activating AWI↔AE tracing

    Posted 11-06-2017 08:32 AM
    Just for fun I did following changes - with no success:

    logback.xml:    <root level="TRACE">

    uc4config.xml (logging section was not there by default):
        <logging count="10"></logging>
        <trace count="10" xml="3"></trace>





  • 8.  Activating AWI↔AE tracing

    Posted 11-06-2017 08:43 AM
    Oh, and here’s one more quirk I noticed:
    ${log_path:-}${HOSTNAME}_${app_name:-ECC}_LOG.00.txt
    Here, the app_name variable appear to be getting set to an empty string, and the variable reference with a default value, ${app_name:-ECC}, therefore also resolves to a blank string. As a result, the AWI log file is being written with the name awihost__LOG.00.txt instead of awihost_ECC_LOG.00.txt.

    I’m not sure where or how app_name is supposed to be set.


  • 9.  Activating AWI↔AE tracing

    Posted 11-06-2017 08:54 AM
    Oh yeah, and then there’s this other quirk in the default framework-logging.xml file:
    <file>${log_path:-}${HOSTNAME}_${app_name:-ECC}_FRAMEWORK.00.txt</file>
    <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
         <fileNamePattern>${log_path:-}${HOSTNAME}_${app_name:-ECC}_FRAMEWORK.0%i.txt.zip</fileNamePattern>
         <minIndex>1</minIndex>
         <maxIndex>9</maxIndex>
    </rollingPolicy>
    What’s that .zip extension doing there? How is log file rotation supposed to work if file and fileNamePattern  don’t match?


  • 10.  Activating AWI↔AE tracing

    Posted 11-06-2017 11:09 AM
    The Logback documentation explains how Logback works, but there are many ways to configure it, and I do not yet have a clear picture of exactly how the AWI implements Logback. I did however discover a system property that can be used to instruct the AWI to use an alternate Logback configuration file.


  • 11.  Activating AWI↔AE tracing

    Posted 11-07-2017 07:16 AM

    I received an answer from Automic Support:

    [T]he TRACE and LOG files have been merged, and everything is already written to the logfile.

    I presume this is the log file specified in thelogback.xmlconfig file.



  • 12.  Activating AWI↔AE tracing

    Posted 11-07-2017 08:12 AM

    I took a closer look at logback.xml and saw this section:

    <!-- trace loggers for Automation Engine - Change log level in uc4config.xml -->
    <logger name="com.uc4.ecc.framework.core.aetracing" level="TRACE" additivity="false">
            <appender-ref ref="LOGGER" />
    </logger>

    I confirmed that adding the xml=3 attribute to the trace element in uc4config.xml causes additional messages to be written to the main AWI log file — that is, the one specified in the logback.xml config file. These messages can be identified in the log by the truncated class name .aetracing.AutomationEngineTraceListener.

    Here is an example showing an EH (activity list changed) kick event:

    2017-11-07 14:00:56,305 ionID=0000000002386086 [TRACE] NOSESSION/- NOUI   [.aetracing.AutomationEngineTraceListener] - <uc-env session="">
       <kick client="0001" idnr="0000000000" system="AE_SYS1">EH         </kick>
    </uc-env>

    Interestingly, unlike the equivalent messages in UCDJ trace file, the AWI-AE trace messages do not indicate whether the XML was sent to the AE server or received from it.