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
Get Updates on the Splunk Community!

Fueling your curiosity with new Splunk ILT and eLearning courses

At Splunk Education, we’re driven by curiosity—both ours and yours! That’s why we’re committed to delivering ...

Splunk AI Assistant for SPL 1.1.0 | Now Personalized to Your Environment for Greater ...

Splunk AI Assistant for SPL has transformed how users interact with Splunk, making it easier than ever to ...

Unleash Unified Security and Observability with Splunk Cloud Platform

     Now Available on Microsoft AzureOn Demand Now Step boldly into the AI revolution with enhanced security ...