AppD Archive

Unable to open socket file: target process not responding or HotSpot VM not loaded

CommunityUser
Splunk Employee
Splunk Employee

Hi I am getting this error while starting javaagent.

java -Xbootclasspath/a:/usr/lib/jvm/java-1.7.0-openjdk.x86_64/lib/tools.jar -jar /home/ec2-user/profilertool/myAppAgent/javaagent.jar 641

Attaching to VM [641]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                                        java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                                        sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoin                                                                                        t.java:727)
Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open sock                                                                                        et 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(LinuxAttach                                                                                        Provider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        ... 5 more
Exception in thread "main" java.lang.RuntimeException: java.lang.reflect.Invocat                                                                                        ionTargetException
        at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoin                                                                                        t.java:741)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                                        java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                                        sorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at com.singularity.ee.agent.appagent.AgentEntryPoint.main(AgentEntryPoin                                                                                        t.java:727)
Caused by: com.sun.tools.attach.AttachNotSupportedException: Unable to open sock                                                                                        et 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(LinuxAttach                                                                                        Provider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        ... 5 more

Please give me some clue.

Regards,

Vishram

0 Karma

CommunityUser
Splunk Employee
Splunk Employee

Vishram, it sounds like the javaagent attach is failing due to privileges. Are you running the command line as a user with equal or higher privileges than the process you are trying to attach / monitor? That's what I'd suggest looking...

0 Karma
Get Updates on the Splunk Community!

See just what you’ve been missing | Observability tracks at Splunk University

Looking to sharpen your observability skills so you can better understand how to collect and analyze data from ...

Weezer at .conf25? Say it ain’t so!

Hello Splunkers, The countdown to .conf25 is on-and we've just turned up the volume! We're thrilled to ...

How SC4S Makes Suricata Logs Ingestion Simple

Network security monitoring has become increasingly critical for organizations of all sizes. Splunk has ...