What are the methods to which one can run Tomcat tracing to review for activity during Export, Attachments and axis soap Web Services call, such as doQuery or doSelect?
Release : 17.3
Component : Svc Desk Web Services
To turn on logging to collect Tomcat activity, run the following command from the SDM Server's Administrative Command Prompt:
Pdm_log4j_config -f SDM_WEB -l DEBUG -a -s 30MB
You will find the logging under NX_ROOT\log\jsrvr.log.
With the above logging enabled, you will see an entry such as this to indicate that a doQuery was invoked:
09/01 15:41:19.130[http-nio-8080-exec-5] INFO USDLogHandler ? USDJWS: 9/01/19, 3:41:19 PM EDT - 192.0.2.1 - 1434311452 : doQuery - objectType=cr, whereClause=null
This shows a call was made from IP address 192.0.2.1 on session ID (SID) 1434311452. The cr (Call_Req) object was involved and no where clause was specified. To corroborate the source of the call, look over the earlier log entries that reference the given SID number, which in this case is highlighted in bold above, value 1434311452 .
Similarly, for a doSelect:
09/01 15:41:19.130[http-nio-8080-exec-5] INFO USDLogHandler ? USDJWS: 9/01/19, 3:41:19 PM EDT - 192.0.2.1 - 1434311452 : doSelect - objectType=cr, whereClause=null
Searching earlier, you will see an entry such as:
09/01 15:39:56.226[http-nio-8080-exec-3] INFO usdsda ? Web Services session created 1434311452; user(USER1); IP(192.0.2.1); session count 2
The query was invoked by user "USER1" from IP address 192.0.2.1.
For attachments, you may see an entry such as this:
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpRetURL) : value(http://server1234.example.com:8080/CAisd/pdmweb.exe?SID=1820000336+FID=2054+OP=DISPLAY_FORM+HTMPL=attmnt_upload_done.htmpl+KEEP.AttmntParent=cr:400001)
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpRespType) : value(URLText)
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(Test) : value()
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpServerName) : value(server1234)
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpMaxFileSize) : value(0)
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 158 Form input field name(inpBpsid) : value(3413942)
04/17 07:29:57.988[http-nio-8080-exec-8] DEBUG UploadAttachment 188 Got file data for (itil-content-17.1.txt)
04/17 07:29:58.003[http-nio-8080-exec-8] DEBUG UploadAttachment 364 Received data file with size = 10737
04/17 07:29:58.003[http-nio-8080-exec-8] DEBUG UploadAttachment 199 Copied data to temporary file: d7ff9b48-4758-4268-81ff-08a3eb7161ed3569176598503667533.gz
This shows that file "itil-content-17.1.txt" was uploaded to a request ticket with persid "cr:400001" to attachment server "server1234" based on the highlights in the above logging in bold.
To turn off logging, run this command:
Pdm_log4j_config -f SDM_WEB -l INFO -a -s 3MB
The above logging applies to any Tomcat related processes. This includes SOAP Web services, PDMExport or pdm_export, and any logins to the Tomcat web interface.
Recycling SDM Services after configuring the above debug logging will not stop the debug logging and debug content will continue to be written to jsrvr.log after a given SDM Services recycle.
For versions of SDM that use Log4J2 (17.3 RU15 and higher and 17.4), the command has changed. Try this instead:
pdm_log4j_config -f SDM_WEB -l DEBUG -n com.ca.ServicePlus.pdmweb -s 30MB
Deactivate by running:
pdm_log4j_config -f SDM_WEB -l INFO -n com.ca.ServicePlus.pdmweb -s 3MB
For REST Web Services logging/tracing, please see KB Article 120004