Splunk AppDynamics

Machine agent extension not starting

Sergio_Mandujan
New Member

Machine agent is not starting and crashes with an error:

[Agent-Monitor-Scheduler-2] 26 Aug 2021 00:02:14,981 INFO MonitorExecutorServiceModule - Initializing the ThreadPool with size 2
[Agent-Monitor-Scheduler-2] 26 Aug 2021 00:02:14,982 ERROR PeriodicTaskRunner - Error creating environment task
java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to java.util.List
at com.appdynamics.extensions.conf.modules.HttpClientModule.initHttpClient(HttpClientModule.java:29)
at com.appdynamics.extensions.conf.MonitorConfiguration.loadConfigYml(MonitorConfiguration.java:181)
at com.appdynamics.extensions.conf.MonitorConfiguration$1.onFileChange(MonitorConfiguration.java:106)
at com.appdynamics.extensions.conf.modules.FileWatchListenerModule.createListener(FileWatchListenerModule.java:37)
at com.appdynamics.extensions.conf.MonitorConfiguration.setConfigYml(MonitorConfiguration.java:112)
at com.appdynamics.extensions.conf.MonitorConfiguration.setConfigYml(MonitorConfiguration.java:116)
at com.appdynamics.extensions.ABaseMonitor.initialize(ABaseMonitor.java:94)
at com.appdynamics.extensions.ABaseMonitor.execute(ABaseMonitor.java:127)
at com.singularity.ee.agent.systemagent.components.monitormanager.managed.MonitorTaskRunner.runTask(MonitorTaskRunner.java:148)
at com.singularity.ee.agent.systemagent.components.monitormanager.managed.PeriodicTaskRunner.runTask(PeriodicTaskRunner.java:86)
at com.singularity.ee.agent.systemagent.components.monitormanager.managed.PeriodicTaskRunner.run(PeriodicTaskRunner.java:47)
at com.singularity.ee.util.javaspecific.scheduler.AgentScheduledExecutorServiceImpl$SafeRunnable.run(AgentScheduledExecutorServiceImpl.java:122)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at com.singularity.ee.util.javaspecific.scheduler.ADFutureTask$Sync.innerRunAndReset(ADFutureTask.java:335)
at com.singularity.ee.util.javaspecific.scheduler.ADFutureTask.runAndReset(ADFutureTask.java:152)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.access$101(ADScheduledThreadPoolExecutor.java:119)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.runPeriodic(ADScheduledThreadPoolExecutor.java:206)
at com.singularity.ee.util.javaspecific.scheduler.ADScheduledThreadPoolExecutor$ADScheduledFutureTask.run(ADScheduledThreadPoolExecutor.java:236)
at com.singularity.ee.util.javaspecific.scheduler.ADThreadPoolExecutor$Worker.runTask(ADThreadPoolExecutor.java:694)
at com.singularity.ee.util.javaspecific.scheduler.ADThreadPoolExecutor$Worker.run(ADThreadPoolExecutor.java:726)
at java.lang.Thread.run(Thread.java:745)

Labels (1)
0 Karma
1 Solution

Hiroki_Ito
Contributor

Thank you for sharing the config.yml.
Looks like you are missing "-" before mgmtUrl.

Please configure like below and try again.
servers:
- mgmtUrl: "http://localhost:8080/SEMP"

Best Regards,
Hiroki

View solution in original post

0 Karma

Hiroki_Ito
Contributor

Thank you for posting to the community.
Could you please share what extension you are using?

This error often happens when config.yml is wrongly configured.
Could you please check the config.yml and see if the yml file is properly configured?

Also please check it is a valid yml file.

If you can't find a problem, could you please paste the content of the config.yml?
Please eliminate personally identifying information (PII).

Best Regards,
Hiroki
0 Karma

Sergio_Mandujan
New Member

Thanks for your response.

We are trying to use a custom extension to monitor Solace broker. This extension is public on github.

This is the config.yml file:

### ANY CHANGES TO THIS FILE DOES NOT REQUIRE A RESTART ###

# This will create this metric in a specific component so that the same
# custom metric name will be distinct under different applications
# see: https://community.appdynamics.com/t5/Knowledge-Base/How-to-troubleshoot-missing-custom-metrics-or-ex...
metricPrefix: "Server|Component:<Component_id>|Custom Metrics|Solace|"

# List of Solace Servers
servers:
mgmtUrl: "https://mrzvka122dhaa.messaging.solace.cloud:943/SEMP"
# encryptedPassword: "gD1962YptbA8bsaHmYXlSw=="
# encryptionKey: "na1jFUKT8euDXp1p7bgwIxhI6ZESLylz"
#displayName is required. Displays your server name in metric path.
displayName: "SolaceLab"
# requestTimeout: 1000000 # one second timeout
vpnExclusionPolicy: "blacklist"
excludeMsgVpns: ["#config-sync", "default"]
queueExclusionPolicy: "blacklist"
excludeQueues: ["#P2P/.*"]
topicEndpointExclusionPolicy: "blacklist"
excludeTopicEndpoints: ["#P2P/.*"]
excludeTemporaries: true
# number of concurrent tasks
numberOfThreads: 2

# timeout for the thread
# threadTimeout: 30

0 Karma

Hiroki_Ito
Contributor

Thank you for sharing the config.yml.
Looks like you are missing "-" before mgmtUrl.

Please configure like below and try again.
servers:
- mgmtUrl: "http://localhost:8080/SEMP"

Best Regards,
Hiroki
0 Karma

Sergio_Mandujan
New Member

Thanks for your help,

Now is running!!

0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

A Four-Part Event Series: Full Stack Observability For the AI Era

As AI reshapes applications, infrastructure, and the way teams operate, the traditional boundaries of ...

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Event Series: Level up your SOC: Advancing with Splunk Enterprise Security

AI has fundamentally raised the stakes for security operations, and this three-part series is your guide to ...