AppD Archive

getting NullPointerException with activemq-monitoring-extension

CommunityUser
Splunk Employee
Splunk Employee

I am getting below exception

java.lang.NullPointerException
at java.util.ServiceLoader$LazyIterator.hasNext(ServiceLoader.java:346)
at java.util.ServiceLoader$1.hasNext(ServiceLoader.java:439)
at javax.management.remote.JMXConnectorFactory.getConnectorAsService(JMXConnectorFactory.java:471)
at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:341)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:267)
at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:227)
at com.appdynamics.extensions.jmx.JMXConnectionUtil.connect(JMXConnectionUtil.java:41)
at com.appdynamics.extensions.activemq.ActiveMQMonitorTask.call(ActiveMQMonitorTask.java:71)
at com.appdynamics.extensions.activemq.ActiveMQMonitorTask.call(ActiveMQMonitorTask.java:39)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)

0 Karma

Arun_Dasetty
Super Champion

Hi Ramesh,

Can you please send the following logs to assist you further:

- zipped version of logs under <machineagent-dir>/logs path and zipped version of ApacheMonitor folder under path <machineagent-dir>/monitors path

- Now stop the machineagent and take and clear all logs under <machinagent-dir>/logs path and updated the following line listed below in log4j.xml at <machineagent_dir>/conf/logging path as follows:

Before update:

<level value="info"/>

After update:

<level value="debug"/>

- now start the machine agent java process and collect the latest machineagent.log after running for 10 minutes.

Keep us posted the requested logs.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Please find requested files.

0 Karma

Arun_Dasetty
Super Champion

Hi Ramesh,

We see the config looks and we do see the error in machineagent logs, Can you stop the machine agent 3.9.1 and install latest machine agent version 3.9.5 or 3.9.4 in different directory and copy activemq latest monitor and configure monitor.xml afresh and see how it goes with same controller host and application-name  details post machineagent restart with new directory?

We have similar bug in 3.9.1 which is fixed in later machineagent version, would like to check the behavior with latest machine agent version, Keep us posted how it goes.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Arun,

I tried with machineagent(3.9.5) version. but getting below error with command "/usr/local/java/bin/java -Xms64m -Xmx64m -jar machineagent.jar -Dappdynamics.agent.maxMetrics=500"

[Agent-Monitor-Scheduler-1] 12 Nov 2014 02:26:03,013 ERROR ManagedMonitorDelegate - Maximum metrics limit reached [200] no new metrics can be created. This exception will not repeat until restart.

0 Karma

Arun_Dasetty
Super Champion

Hi Ramesh,

While you send the startup script (need specifically from command console to see if any quotes issue here) from console and machine agent latest logs. Actually we expect the message to reflect 500 limit reached weird it shows 200.

Can you try to exclude unnecessary metrics or pattern in config.yml under ActiveMQMonitor and restart and see if that reduces the unique metrics reported and is under 200 itself.

Regards,

Arun

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

it is working fine now with below command. thank you for your help

/usr/local/java/bin/java -Xms64m -Xmx64m -Dappdynamics.agent.maxMetrics=2500  -jar machineagent.jar

0 Karma
Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...