Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I troubleshoot the Java Agent if I'm not seeing Transaction Analytics Data?

The scope of this document is to troubleshoot the Java Agent when Transaction Analytics is not receiving any data. If you aren't seeing Transaction Analytics data under Analytics, start troubleshooting from the origin of the events by following the steps below:

 

1. Check if Analytics is enabled for the Business Transactions (BT) of the application:

  • Go to Analytics > Configuration > Transaction Analytics > Configure Analytics for Application.
  • Make sure the Enable Analytics Data Collection for <Applicationcheckbox is selected and that the BT is present in the list on the left-hand side under Configure Which Transactions Report Analytics Data.

 

2. Open the Application Agent log to look for the analytics-dynamics-service-enabled property, and make sure it's set to true.

 

3. Later, look for other similar log entries as shown below. This ensures the Dynamic Services for Analytics Data Collection have started and that the Java Agent is now sending the analytics-enabled BT events to the Analytics Agent.

 

[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,278  INFO AnalyticsDynamicServiceConfigListener - Analytics Dynamic Service configuration listener received new properties from the Controller, starting refresh operation.
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,278  INFO AnalyticsDynamicServiceConfigListener - ********** Started applying Analytics Dynamic Service properties from Controller *************
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,279  INFO Analytics - Analytics Dynamic Service config [ENABLED] = true
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,302  INFO WriterMaster - Initialized with writer parameters [65536 (appdynamics.analytics.bufferPool.maxCount), 65536 (appdynamics.analytics.tlsCharBuffer.maxLength), 128 (appdynamics.analytics.unflushedQueue.maxLength), 2 (appdynamics.analytics.numOfSinkWriterTasks), 102400 (appdynamics.analytics.message.maxSizeBytes), 10000] and sink parameters ['http://localhost:9090/v2/sinks/bt' (appdynamics.analytics.agent.url), 30000 (appdynamics.analytics.agent.connection.timeoutMillis), 1200 (appdynamics.analytics.agent.send.attempt.max), 15000 (appdynamics.analytics.agent.send.attempt.pauseMillis), 16 (appdynamics.analytics.agent.send.batch.items.max), 60000 (appdynamics.analytics.throughputCollectionIntervalMillis)]
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,304  INFO WriterMaster - Starting
[appdynamics-analytics-writer0] 17 Oct 2018 23:34:46,319  INFO SinkWriterTask - Starting
[appdynamics-analytics-writer1] 17 Oct 2018 23:34:46,320  INFO SinkWriterTask - Starting
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,321  INFO WriterMaster - Started
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,324  INFO AnalyticsCollectorFactory - Analytics configured with new delegate: [com.singularity.ee.service.analytics.Analytics]
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,324  INFO Analytics - Started [Analytics] collector
[AD Thread Pool-Global0] 17 Oct 2018 23:34:46,324  INFO AnalyticsDynamicServiceConfigListener - --------- Finished applying Analytics Dynamic Service properties from Controller ------------

 

4. Check if the  analytics-dynamics-service-enabled property is set to true.

  •  If it is true, but the later logs never confirm WriterMaster - Started or Analytics - Started [Analytics] collector, it's possible that the analytics-dynamics-service.jar file under javaagent/ver4.x.x.xxxxx/external-service/analytics is not present. 
  • In this case, please re-download a valid Java Agent installer package from the Download site, which has analytics-dynamics-service.jar under javaagent/ver4.x.x.xxxxx/external-service/analytics, and instrument the application again. 

 

5. Check if the analytics-dynamics-service.jar file is present under the javaagent/ver4.x.x.xxxxx/external-service/analytic directory.

  • If present, open javaagent/ver4.x.x.xxxxx/conf/app-agent-config.xml and look for the following: 
<agent-service name="DynamicServiceManager"
                       implementation-class-name="com.singularity.ee.agent.appagent.kernel.DynamicServiceManager"
                       enabled="true">

  <implementation-class-name>
    com.singularity.ee.agent.appagent.kernel.DynamicServiceManager
  </implementation-class-name>

  <configuration-properties>
    <property name="external-service-directory" value="external-services"/>
  </configuration-properties>

</agent-service> 
  • If it's not present, please add it as mentioned above.
      
6. Check if the above config is present.
  • If present, open the latest javaagent/ver4.x.x.xxxxx/logs/dynamic-service*.log and look for  any error in loading Analytics Dynamics Services.
  • Check if an error similar to the following is present.
[AD Thread Pool-Global0] 18 Oct 2018 13:02:56,585  INFO com.singularity.dynamicservice.DynamicServiceManager - Service class name com.singularity.ee.service.analytics.Analytics
[AD Thread Pool-Global0] 18 Oct 2018 13:02:56,590 ERROR com.singularity.dynamicservice.DynamicServiceManager - Error occurred while polling for new services
java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "getClassLoader")
	at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472) ~[?:1.8.0_102]
	at java.security.AccessController.checkPermission(AccessController.java:884) ~[?:1.8.0_102]
	at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) ~[?:1.8.0_102]
	at java.lang.ClassLoader.checkClassLoaderPermission(ClassLoader.java:1528) ~[?:1.8.0_102]
	at java.lang.ClassLoader.getParent(ClassLoader.java:1374) ~[?:1.8.0_102]
	at com.singularity.ee.agent.appagent.kernel.classloader.AgentClassLoader.a(AgentClassLoader.java:432) ~[appagent-boot.jar:?]
	at com.singularity.ee.agent.appagent.kernel.classloader.AgentClassLoader.c(AgentClassLoader.java:415) ~[appagent-boot.jar:?]
	at com.singularity.ee.agent.appagent.kernel.classloader.d.b(d.java:69) ~[appagent-boot.jar:?]
	at com.singularity.ee.agent.appagent.kernel.classloader.AgentClassLoader.loadClass(AgentClassLoader.java:305) ~[appagent-boot.jar:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:411) ~[?:1.8.0_102]
	at com.singularity.ee.util.c.loadClass(c.java:320) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.agent.appagent.kernel.c.loadClass(c.java:84) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[?:1.8.0_102]
	at com.singularity.ee.service.analytics.Analytics.<init>(Analytics.java:70) ~[?:?]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_102]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_102]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_102]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_102]
	at java.lang.Class.newInstance(Class.java:442) ~[?:1.8.0_102]
	at com.singularity.ee.agent.util.reflect.l.f(l.java:1693) ~[appagent-boot.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.agent.appagent.kernel.DynamicServiceManager.pollDirectoryForNewServices(DynamicServiceManager.java:476) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.agent.appagent.kernel.DynamicServiceManager.pollForNewServices(DynamicServiceManager.java:329) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.agent.appagent.kernel.DynamicServiceManager.run(DynamicServiceManager.java:272) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.util.javaspecific.scheduler.n.run(n.java:122) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_102]
	at com.singularity.ee.util.javaspecific.scheduler.z.e(z.java:335) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.util.javaspecific.scheduler.a.b(a.java:152) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.util.javaspecific.scheduler.b.a(b.java:119) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.util.javaspecific.scheduler.b.b(b.java:206) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.util.javaspecific.scheduler.b.run(b.java:236) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.util.javaspecific.scheduler.i.a(i.java:694) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at com.singularity.ee.util.javaspecific.scheduler.i.run(i.java:726) ~[appagent.jar:Server Agent #4.5.0.23604 v4.5.0 GA compatible with 4.4.1.0 r88b53d319a45abc58963be9d2d0824499a2c23dd release/4.5.0-release]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_102]
 
  • If yes, you need to provide the permission in the java.policy file under <JAVA_HOME>/lib/security/java.policyas follows:
grant codeBase "file:/opt/appdynamics/-" { 
permission java.security.AllPermission;
permission java.lang.management.ManagementPermission "monitor";
permission java.io.FilePermission "read";
};

 

This should fix the Analytics Dynamics Service startup issue and it should start reporting events to the Analytics Agent, which is responsible for forwarding these events further to the Events Service.

 

Once the above issues are fixed, you can expect events to be forwarded to the Analytics Agent. However, if you still don't see data in Analytics, you should look for communication issues between the Analytics Agent and the Java Agent following the steps below:

 

1. Check if the Java Agent configured to send the events to the correct Analytics Agent endpoint. 

  • By default, the Java Agent sends events to the Analytics Agent running at http://localhost:9090 but if this is not the case, you have to explicitly set the JVM parameter to talk to the remote Analytics Agent. This is discussed in detail in our documentation.

 

2. If for some reason (e.g., maintenance or communication config issues) the Java Agent is not able to talk to Analytics Agent for a very long period of time, the Java Agent will start queuing the events on its end in hopes that the Analytics Agent communication will be back up soon. However, if it does not happen in time, you will see a WARNING in the Java Agent log that says "Internal buffers appear to be full."  After multiple failed attempts, the Java Agent will disable the Analytics Service in itself and stop sending data to the Analytics Agent. To resume this, go to Analytics > Configuration > Transaction Analytics > Configure Analytics for Application and disable and re-enable the Enable Analytics Data Collection for <Application> checkbox. If this does not work, try a JVM restart to resume the service. 

Version history
Revision #:
6 of 6
Last update:
4 weeks ago
Updated by:
 
Labels (1)
0 Kudos