cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Machine agent extension not starting

Sergio.Mandujano
Wanderer

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)

4 REPLIES 4

Hiroki.Ito
AppDynamics Team

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

Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

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


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

Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.

Thanks for your help,

 

Now is running!!