Splunk AppDynamics

Java Agent fails to start

CommunityUser
Splunk Employee
Splunk Employee

When starting the java agent under tomcat 9 using version 4.4.0.4 I get the following exception. The agent is configured in setenv as set CATALINA_OPTS=%CATALINA_OPTS% -javaagent:"C:\appdynam\Agents\ver4.4.0.4\javaagent.jar".

Any ideas how to fix this?

Full Agent Registration Info Resolver using selfService [true]
Full Agent Registration Info Resolver using selfService [true]
Full Agent Registration Info Resolver using application name [Trellis]
Full Agent Registration Info Resolver using tier name [ABC]
Full Agent Registration Info Resolver using node name [XYZ]
Install Directory resolved to[C:\appdynam\Agents\ver4.4.0.4]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.__invoke(DelegatingMethodAccessorImpl.java:43)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.singularity.ee.agent.appagent.AgentEntryPoint$1.run(AgentEntryPoint.java:647)
Caused by: java.lang.ExceptionInInitializerError
        at com.singularity.ee.agent.appagent.kernel.JavaAgent.initialize(JavaAgent.java:308)
        ... 7 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: 25
        at com.singularity.ee.controller.api.constants.AgentType.<clinit>(AgentType.java:55)
        ... 8 more

Labels (1)
0 Karma

Peter_Holditch
Builder

What JDK version are you using to run tomcat?

Can you provide your agent logs (they will be in C:\appdynam\Agents\ver4.4.0.4\logs\XYZ)

Warm regards,
Peter

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

The logs directory is empty. I am using jdk1.8.0_144

0 Karma

Peter_Holditch
Builder

That is very odd.  I think this is best investigated interactively via a support ticket; could you open one?

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

i do not have access to cretate tickets.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Alan,

that happened to me before (with previous agent versions) and my problem was this (referring to the doc):

The user under which the JVM runs must have write privileges to the conf and logs directories in the Java Agent home. To achieve this, you can install the agent as the same user that owns the JVM or as an administrator on the host machine. You can restrict the remaining contents of the agent directory to read only access.

Did you check if the user has permission to the conf and logs directories? (that could be the reason the log directory is empty)

Best!

Julia

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Thanks Julia. I checked the permissions and everything looks good.

Did you get this exception is the past? java.lang.ArrayIndexOutOfBoundsException: 25

I have a ffeling that the error occurs before it writes to any logs.

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Alan,

not so far 😞

I hope you can solve this!

Best,

Julia

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

yes I will.

0 Karma
Get Updates on the Splunk Community!

Say goodbye to manually analyzing phishing and malware threats with Splunk Attack ...

In today’s evolving threat landscape, we understand you’re constantly bombarded with phishing and malware ...

AppDynamics is now part of Splunk Ideas

Hello Splunkers, We have exciting news for you! AppDynamics has been added to the Splunk Ideas Portal. Which ...

Advanced Splunk Data Management Strategies

Join us on Wednesday, May 14, 2025, at 11 AM PDT / 2 PM EDT for an exclusive Tech Talk that delves into ...