Unable to bind APM to java process

Getting this error while binding apm-agent with java process.

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:498)
at co.elastic.apm.attach.bytebuddy.agent.Attacher.install(Attacher.java:106)
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:603)
... 3 more
Caused by: java.lang.IllegalStateException: Target VM did not respond: 25421
at co.elastic.apm.attach.bytebuddy.agent.VirtualMachine$ForHotSpot$Connection$Factory$ForSocketFile.connect(VirtualMachine.java:541)
at co.elastic.apm.attach.bytebuddy.agent.VirtualMachine$ForHotSpot.attach(VirtualMachine.java:256)
at co.elastic.apm.attach.bytebuddy.agent.VirtualMachine$ForHotSpot.attach(VirtualMachine.java:243)
... 9 more

Hi :wave:

How are you attaching the agent? With apm-agent-attach-standalone.jar? What's the command you use?

From my guess is that the process ID 25421 either does not exist or is not a Java application. You can check that via ps aux | grep <pid>.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.