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
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!

Kick the Tires Before You Commit: A Hands-On Tour of the Splunk Observability Cloud ...

Evaluating an enterprise observability platform usually goes like this: fill out a form, get a free trial with ...

Deep insights, no barriers: Splunk Observability Cloud Free Edition

As software delivery cycles continue to accelerate, observability shouldn’t be a luxury — it should be a ...

Monitoring AI Agents with Splunk Observability Cloud

Let’s say I’m running a travel planning AI app in production. A user asks for three concise hotel options in ...