Splunk AppDynamics

Issue while attaching javaagent.jar to existing jvm on windows-8 64 bit

CommunityUser
Splunk Employee
Splunk Employee

So I started with community document on how to setup appdynamics 4.3 on premises.

At a point it talks about javaagent.jar its uses and installation, than we need to attach it to existing jvm process for which I used 

https://docs.appdynamics.com/display/PRO43/Install+the+Java+Agent

but when I am doing is following steps and this is what I got on cmd

C:\>java -Xbootclasspath/a:"PATH TO JDKlib\tools.jar" -jar "PATH TO APPAGENTver4.3.1.0\javaagent.jar" 6616
Attaching to VM [6616]
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 java.lang.reflect.Method.invoke(Method.java:497)
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:753)
Caused by: java.io.IOException: no such process
at sun.tools.attach.WindowsVirtualMachine.openProcess(Native Method)
at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:56)
at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
... 5 more
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:767)
Caused by: 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 java.lang.reflect.Method.invoke(Method.java:497)
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:753)
Caused by: java.io.IOException: no such process
at sun.tools.attach.WindowsVirtualMachine.openProcess(Native Method)
at sun.tools.attach.WindowsVirtualMachine.<init>(WindowsVirtualMachine.java:56)
at sun.tools.attach.WindowsAttachProvider.attachVirtualMachine(WindowsAttachProvider.java:69)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
... 5 more

Labels (1)
0 Karma

Saradhi_Pothara
Communicator

Hi,

1) java -Xbootclasspath/a:"PATH TO JDKlib\tools.jar" -jar "PATH TO APPAGENTver4.3.1.0\javaagent.jar" 6616

I believe you have stripped the paths here but using correct path in your command.

2) In that could you check if the process 6616 exists while you attach it or is it a short lived JVM?

3) 6616 could be runnig with a different java than the java that is in the path. As you are not using fully qualified java path in the command these two javas could be different. Could you please check? Also check if the user attaching the javaagent and the user running the java process are same.

4) Also please let us know the java version both for the java in path and the java that process 6616 uses.

5) You can configuration java agent by passing the javaagent argument to your application start up script. This is another way of instrumenting the application.

-javaagent:<agent_home>\javaagent.jar

https://docs.appdynamics.com/display/PRO43/Install+the+Java+Agent

Regards,
Saradhi

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!

SOC4Kafka - New Kafka Connector Powered by OpenTelemetry

The new SOC4Kafka connector, built on OpenTelemetry, enables the collection of Kafka messages and forwards ...

Rounding off the Splunk Dashboard Contest

What does a contest-winning Splunk dashboard look like? In this case, it isn't in a browser tab at all. It ...

A Four Part Event Series: AI + Observability: AI Agents, LLMs, Apps, & Infrastructure

AI &#43; Observability: AI Agents, LLMs, Apps, & Infrastructure The rapid evolution of artificial intelligence ...