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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...