AutoProbe issue on startup with AutoPersist.pbd

Document ID : KB000112675
Last Modified Date : 31/08/2018
Show Technical Document Details
Issue:
The following error is observed  with the Java Agent on a Tomcat server in the AutoProbe log:

 
Introscope AutoProbe Log: /opt/introscope/logs/AutoProbe.log Release 10.2.0.27 (Build 990300)(Diagnos Version 2)
*********************************************************************************************************************************************************************************************************************************************************************************** Unable to instrument. Invalid settings provided: 1 (/opt/introscope/core/config/hotdeploy/AutoPersist.pbd:27) Syntax Error: Method descriptor "(Ljavax/servlet/ServletRequest;Ljavax" has an invalid parameter. The expected syntax is "SkipMethodForClass: ".
***********************************************************************************************************************************************************************************************************************************************************************************

On other Tomcat servers this is working.
Environment:
Noted in APM 10.2
Cause:
A line was written incompletely in AutoPersist.pbd, the method signature was not completed

Example of failing definition
SkipMethodForClass: org.apache.catalina.core.ApplicationFilterChain internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax

Example of a fully-defined directive:
SkipMethodForClass: org.apache.coyote.AbstractProtocol$ConnectionHandler process(Lorg/apache/tomcat/util/net/SocketWrapperBase;Lorg/apache/tomcat/util/net/SocketEvent;)Lorg/apache/tomcat/util/net/AbstractEndpoint$Handler$SocketState;




 
Resolution:
In the example, the situation was resolved by copying a version of AutoPersist.pbd from a working agent to the agent giving an error
Additional Information:
Suggestions made to deal with this situation that were not validated
  • Remove the erroneous line from AutoPersist.pbd
SkipMethodForClass: org.apache.catalina.core.ApplicationFilterChain internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax

The concern by doing that is that the error might come back.
  • Complete the line correctly
To suggest what the full line should be, it should look like this, based on reviewing our ServletFilter instrumentation configuration:

SkipMethodForClass: org.apache.catalina.core.ApplicationFilterChain internalDoFilter(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljavax/servlet/FilterChain;)V
 
  • Another thing to suggest would be to add configuration in the agent profile to avoid evaluation of code from that package by setting this property:
introscope.agent.deep.entrypoint.skip.pkgs=org.apache.catalina.core