Splunk AppDynamics

Machine agent shows error Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException

Srivathsan_Srin
Engager

Machine agent log shows error as below. We have restarted the machine agent and the issue still persists. Can someone help in fixing this?

[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SimAgentRepetitiveLoggingModule - The turnover time for the SIM agent repetitive logger is 5 minutes
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SimAgentRepetitiveLoggingModule - The cache size for the SIM agent repetitive logger is 1000
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SystemAgent - ####################################################################################
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SystemAgent - Agent Install Directory [C:\Program Files\AppDynamics\AppD_Infra_Monitoring]
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SystemAgent - Using Agent Version [Machine Agent v4.4.3.1214 GA Build Date 2018-04-28 05:12:10]
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SystemAgent - JVM Runtime:
java.home=c:\program files\appdynamics\appd_infra_monitoring\jre
java.vm.vendor=Oracle Corporation
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.runtime.version=1.8.0_111-b14
java.io.tmpdir=C:\Windows\TEMP\
user.language=en
user.country=US
user.variant=
Default locale=en_US
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SystemAgent - OS Runtime:
os.name=Windows Server 2012
os.arch=amd64
os.version=6.2
user.name=<servername is removed>$
user.home=C:\Windows\system32\config\systemprofile
user.dir=C:\Program Files\AppDynamics\AppD_Infra_Monitoring\bin
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SystemAgent - JVM Args : -Dexe4j.semaphoreName=Local\c:_program_files_appdynamics_appd_infra_monitoring_bin_machineagentservice.exe0 | -Dexe4j.isService=true | -Dexe4j.moduleName=C:\Program Files\AppDynamics\AppD_Infra_Monitoring\bin\MachineAgentService.exe | -Dexe4j.tempDir=C:\Windows\TEMP\e4j9F57.tmp_dir1646630412 | -Dexe4j.unextractedPosition=316127 | -Djava.library.path=D:\apps_srv\webagent\win32\bin;D:\apps_srv\webagent\win64\bin;D:\apps_srv\webagent\win64\install_config_info\lib;D:\apps_srv\webagent\win64\bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\IBM\ITM\InstallITM;;C:\Program Files\BMCperform\Patrol3\BEST1\11.5.00\bgs\bin;C:\Windows;C:\Windows\system32;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\IBM\ITM\bin;C:\IBM\ITM\TMAITM6;C:\Program Files\PKWARE\pkzipc;C:\Program Files\NCache\bin\tools;;c:\program files\appdynamics\appd_infra_monitoring\jre\bin | -Dexe4j.consoleCodepage=cp0 | -Dlog4j.configuration=file:..\conf\logging\log4j.xml | -XX:-CreateMinidumpOnCrash | -Xrs |
[system-thread-0] 07 Mar 2022 00:20:17,926 INFO SystemAgent - Machine Agent is resolving bootstrap info....
[system-thread-0] 07 Mar 2022 00:20:17,942 INFO SystemAgent - Orchestration is disabled - disabling virtualization resolvers by default.
[system-thread-0] 07 Mar 2022 00:20:17,942 INFO SystemAgent - Full Agent Registration Info Resolver found system property [appdynamics.agent.create.agent.info.if.missing] for appdynamics.agent.create.agent.info.if.missing [false]
[system-thread-0] 07 Mar 2022 00:20:17,942 INFO SystemAgent - Default Host Identifier Resolver using host name for unique host identifier [<servername is removed>]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - Default IP Address Resolver found IP addresses [[169.171.32.81, 169.254.128.132]]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - Full Agent Registration Info Resolver using selfService [false]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - Full Agent Registration Info Resolver using application name [null]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - Full Agent Registration Info Resolver using tier name [null]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - Full Agent Registration Info Resolver using node name [null]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - XML Controller Info Resolver found controller host [appdync-nam-icg-p1.wlb2.nam.nsroot.net]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - XML Controller Info Resolver found controller port [8181]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - XML Agent Account Info Resolver using account name [customer1]
[system-thread-0] 07 Mar 2022 00:20:18,445 INFO SystemAgent - XML Agent Account Info Resolver using account access key [****]
[system-thread-0] 07 Mar 2022 00:20:18,523 WARN FrameworkBootstrap - Failed to start framework
com.google.inject.CreationException: Unable to create injector, see the following errors:

1) Error injecting constructor, java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
at com.singularity.ee.agent.systemagent.SystemAgent.<init>(SystemAgent.java:50)
at com.appdynamics.agent.sim.legacy.LegacyAgentModule.configure(LegacyAgentModule.java:59)
while locating com.singularity.ee.agent.systemagent.SystemAgent
Caused by: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileUploadException
at com.singularity.ee.agent.systemagent.Agent.setupHttpClientWrapper(Agent.java:265)
at com.singularity.ee.agent.systemagent.Agent.<init>(Agent.java:248)
at com.singularity.ee.agent.systemagent.SystemAgent.<init>(SystemAgent.java:42)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.google.inject.internal.DefaultConstructionProxyFactory$2.newInstance(DefaultConstructionProxyFactory.java:86)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:205)
at com.google.inject.internal.InternalInjectorCreator$1.call(InternalInjectorCreator.java:199)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
at com.google.inject.internal.InternalInjectorCreator.loadEagerSingletons(InternalInjectorCreator.java:199)
at com.google.inject.internal.InternalInjectorCreator.injectDynamically(InternalInjectorCreator.java:180)
at com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:110)
at com.google.inject.internal.InjectorImpl.createChildInjector(InjectorImpl.java:226)
at com.appdynamics.voltron.FrameworkBootstrap.createInjector(FrameworkBootstrap.java:105)
at com.appdynamics.voltron.FrameworkBootstrap.start(FrameworkBootstrap.java:162)
at com.appdynamics.agent.sim.main.SecondStageSystem.start(SecondStageSystem.java:175)
at com.appdynamics.agent.sim.main.SecondStageSystem.loadFeatures(SecondStageSystem.java:128)
at com.appdynamics.agent.sim.main.SecondStageSystem.access$000(SecondStageSystem.java:48)
at com.appdynamics.agent.sim.main.SecondStageSystem$1.run(SecondStageSystem.java:115)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileUploadException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 36 more

Labels (1)
0 Karma

iamryan
Community Manager
Community Manager

Hi, @Srivathsan.Srinivasan 

I did some looking around and found that it was recommended to update the agent. I'm not sure what version you are on.

We have a fix with updated jar commons-fileupload-1.3.x.jar starting from v4.5.6 javaagent.

Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...