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!

Splunk Observability as Code: From Zero to Dashboard

For the details on what Self-Service Observability and Observability as Code is, we have some awesome content ...

[Puzzles] Solve, Learn, Repeat: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Shape the Future of Splunk: Join the Product Research Lab!

Join the Splunk Product Research Lab and connect with us in the Slack channel #product-research-lab to get ...