How to enable java arapilogging for the Email Engine on Windows

Version 5
    Share:|

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    PRODUCT:

    Remedy AR System Server


    COMPONENT:

    Remedy AR System Server


    APPLIES TO:

    AR System Email Engine



    QUESTION:

    How can I enable java arapilogging (apiRecording) for the AR System Email Engine on Windows?
     


    ANSWER:

    1) Find arsys_sample.xml in the AREmail directory OR if not there you can get it from C:\Program Files\BMC Software\ARSystem\Arserver\api\lib. The arsys_sample.xml file may exist in several different directories under the AR System main install directory so any file you find under the main install directory will work. 
    2) Copy arsys_sample.xml as arsys_api.xml and move into the AREmail folder.  
    3) Open the arsys_api.xml and look for the section <javaapi_config> </javaapi_config> 
     
    An example would look like this
     
    <javaapi_config>
        <catalogFile>arcatalog</catalogFile>
        <useConnectionPooling>true</useConnectionPooling>
        <maxProxiesPerServer>80</maxProxiesPerServer>
        <idleConnectionsPerServer>5</idleConnectionsPerServer>
        <connectionTimeout>0</connectionTimeout>
        <connectionLifespan>0</connectionLifespan>
        <timeUnit>MINUTES</timeUnit>
        <connectionMaxRetries>1</connectionMaxRetries>
        <timeLagBetweenRetriesMillSec>100</timeLagBetweenRetriesMillSec>
        <toStringStyle>com.bmc.arsys.api.NoPrefixToStringStyle.NO_PREFIX_STYLE</toStringStyle>
        <stringizeFieldAssignments>false</stringizeFieldAssignments>
        <stringizeSetIfQualification>false</stringizeSetIfQualification>
        <apiRecording>0</apiRecording>
        <apiRecordingLogDir></apiRecordingLogDir>
        <jniLoadMode>1</jniLoadMode>
        <webSockets>
            <webSocket>
                <server>acme.api.onbmc.com</server>
                <URL>wss://acme.api.onbmc.com:443</URL> 
            </webSocket>
            <webSocket>
                <server>acme-dev.api.onbmc.com</server>
                <URL>wss://acme-dev.api.onbmc.com:443</URL> 
            </webSocket>
            <webSocket>
                <server>vw-snj-rem-dv02.eng.remedy.com</server>
                <URL>ws://vw-snj-rem-dv02.eng.remedy.com:8000/arsys</URL> 
            </webSocket>
        </webSockets>        
    </javaapi_config>
     
    4) You will need to edit the <apiRecording>0</apiRecording> line (as highlighted above) and change the 0 to 24 or 31 then save the arsys_api.xml. The arsys_sample.xml explains the various logging levels in the file as follows:

    apiRecording - Turns on the client side api logging and produces a command file(<username><servername><port>_arapicmd.log)
                       and a result output file(<username><servername><port>_arapires.log). The value is
                       a bit mask to allow for features to be combined. e.g. In order to have 
                       append mode for the log files and record only the elapsed time and no result data, set the value
                       to 2+8+32 = 42.   
            Valid values:     0 No logging
                              1 Logging on
                              2 Record in append mode in the files
                              4 Record start and finish time
                              8 Record elapsed time in ms
                              16 Combine the command and result files into the result file
                              32 Do not record result data output
                              64 Buffer the file output
            Default value:      0

    Support has found that 24 or 31 are typically the best for gather information need for troubleshooting. 

    For example:

    <apiRecording>31</apiRecording>

    So edited it will look like this:

    javaapi_config>
        <catalogFile>arcatalog</catalogFile>
        <useConnectionPooling>true</useConnectionPooling>
        <maxProxiesPerServer>80</maxProxiesPerServer>
        <idleConnectionsPerServer>5</idleConnectionsPerServer>
        <connectionTimeout>0</connectionTimeout>
        <connectionLifespan>0</connectionLifespan>
        <timeUnit>MINUTES</timeUnit>
        <connectionMaxRetries>1</connectionMaxRetries>
        <timeLagBetweenRetriesMillSec>100</timeLagBetweenRetriesMillSec>
        <toStringStyle>com.bmc.arsys.api.NoPrefixToStringStyle.NO_PREFIX_STYLE</toStringStyle>
        <stringizeFieldAssignments>false</stringizeFieldAssignments>
        <stringizeSetIfQualification>false</stringizeSetIfQualification>
        <apiRecording>31</apiRecording>
        <apiRecordingLogDir></apiRecordingLogDir>
        <jniLoadMode>1</jniLoadMode>
        <webSockets>
            <webSocket>
                <server>acme.api.onbmc.com</server>
                <URL>wss://acme.api.onbmc.com:443</URL> 
            </webSocket>
            <webSocket>
                <server>acme-dev.api.onbmc.com</server>
                <URL>wss://acme-dev.api.onbmc.com:443</URL> 
            </webSocket>
            <webSocket>
                <server>vw-snj-rem-dv02.eng.remedy.com</server>
                <URL>ws://vw-snj-rem-dv02.eng.remedy.com:8000/arsys</URL> 
            </webSocket>
        </webSockets>        
    </javaapi_config>

    5) Once the file is saved, restart the Email Engine service.

    This will generate a log file in the AREmail directory where the formatting will be username+arservername+port_arapires.log. In this case the username will be Remedy Application Service.

    Here is example log file name from my BMC lab system:

    Remedy Application Serviceclm-aus-001490.bmc.com9100_arapires.log

    There are different levels of logging as indicated in the file but typically Support will request you use 24 or 31. 

    The output of the will show the api calls and results, like this for an example:

    #
    # usePrivateRpcQueue(ssc)
    #
    ssc
    5
    2
    390638
    #
    # ARGetServerInfo
    #
    gsi
    1
    4

    ARGetServerInfo results
    Number of Items : 1
            4
        
            Type: CHAR - 9.1.04 201711272256
    ReturnCode:  OK
    Status List : 0 items
    Start Time: 1542311972905 (Thu Nov 15 13:59:32 CST 2018)
    Finish Time: 1542311972924 (Thu Nov 15 13:59:32 CST 2018)
    Elapsed Time: 19 ms

    usePrivateRpcQueue(ssc) results
    ReturnCode:  OK
    Status List : 0 items
    Start Time: 1542311972905 (Thu Nov 15 13:59:32 CST 2018)
    Finish Time: 1542311972976 (Thu Nov 15 13:59:32 CST 2018)
    Elapsed Time: 71 ms
    #
    # ARSetSessionConfiguration
    #
    ssc
    7
    2
    22

    ARSetSessionConfiguration results
    ReturnCode:  OK
    Status List : 0 items
    Start Time: 1542311972977 (Thu Nov 15 13:59:32 CST 2018)
    Finish Time: 1542311972977 (Thu Nov 15 13:59:32 CST 2018)
    Elapsed Time: 0 ms
    #
    # ARVerifyUser
    #
    ver

    ARVerifyUser results
    Admin Flag:   TRUE
    SubAdmin Flag:   TRUE
    Custom Flag:   TRUE
    ReturnCode:  OK
    Status List : 0 items
    Start Time: 1542311972978 (Thu Nov 15 13:59:32 CST 2018)
    Finish Time: 1542311972986 (Thu Nov 15 13:59:32 CST 2018)
    Elapsed Time: 8 ms
    #
    # ARGetListForm
    #
    gls
    0
    1
    F
    6
    179
    3200
    3201
    3209
    3202
    3208


    ARGetListForm results
    Number of Items : 1
            AR System Configuration Component
    ReturnCode:  OK
    Status List : 0 items
    Start Time: 1542311972991 (Thu Nov 15 13:59:32 CST 2018)
    Finish Time: 1542311973043 (Thu Nov 15 13:59:33 CST 2018)
    Elapsed Time: 52 ms
    #
    # ARGetListForm
    #
    gls
    0
    2
    F
    7
    3200
    3201
    3202
    3204
    3205
    3206
    3207


    ARGetListForm results
    Number of Items : 1
            AR System Configuration Component Setting
    ReturnCode:  OK
    Status List : 0 items
    Start Time: 1542311973046 (Thu Nov 15 13:59:33 CST 2018)
    Finish Time: 1542311973115 (Thu Nov 15 13:59:33 CST 2018)
    Elapsed Time: 69 ms

    This information can be useful when troubleshooting issue with API calls that are not logged to the ARServer's API logging. 


    Article Number:

    000160986


    Article Type:

    FAQ/Procedural



      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles