Splunk AppDynamics

Attaching the Java Agent to a Running JVM Process

CommunityUser
Splunk Employee
Splunk Employee

[root@netflow lib]# java -Xbootclasspath/a:/usr/java/jdk1.8.0_60/lib/tools.jar -jar /opt/appdyn/javaagent.jar 11692
Attaching to VM [11692]
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:494)
Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: target process not responding or HotSpot VM not loaded
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:106)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:208)
... 5 more

Labels (1)
0 Karma
1 Solution

Arun_Dasetty
Super Champion

Hi,

Can we please re-run in new shell prompt with same user logged in who launched the jvm process that we are trying to attach with? and see how it goes.

refer forum links:

https://code.google.com/p/jvmtop/issues/detail?id=4

http://stackoverflow.com/questions/5769877/attachnotsupportedexception-due-to-missing-java-pid-file-...

View solution in original post

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi,

any idea?

Thanks

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi,

Just saw this post and looks like I've also been getting a similar error.

java -Xbootclasspath/a:/usr/lib/jvm/java-7-openjdk-amd64/lib/tools.jar -jar /home/avenida/appagent/javaagent.jar 1047
Attaching to VM [1047]
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoint.java:494)
Caused by: java.io.IOException: Operation not permitted
at sun.tools.attach.LinuxVirtualMachine.sendQuitTo(Native Method)
at sun.tools.attach.LinuxVirtualMachine.<init>(LinuxVirtualMachine.java:91)
at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
... 5 more

Could somebody help here?

0 Karma

Arun_Dasetty
Super Champion

Hi,

Can we please re-run in new shell prompt with same user logged in who launched the jvm process that we are trying to attach with? and see how it goes.

refer forum links:

https://code.google.com/p/jvmtop/issues/detail?id=4

http://stackoverflow.com/questions/5769877/attachnotsupportedexception-due-to-missing-java-pid-file-...

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Hi Akumar,

It works! Thank you.

0 Karma
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...

Buttercup Games: Further Dashboarding Techniques (Part 5)

This series of blogs assumes you have already completed the Splunk Enterprise Search Tutorial as it uses the ...

Customers Increasingly Choose Splunk for Observability

For the second year in a row, Splunk was recognized as a Leader in the 2024 Gartner® Magic Quadrant™ for ...