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!

How much can you really learn in 3 minutes?

Observability can certainly be hard to understand – there's a lot of jargon and buzzwords and it seems to ...

Event Series: The Agentic SOC: Trust Before Autonomy

AI is fundamentally changing security operations, but true progress requires more than just automation—it ...

Free Professional Services for .conf26 Attendees

This year at .conf26, we are doing something a little different. We are bringing the best minds from ...