Automatic setup problem

Am testing Automatic setup with apm-agent-attach-1.4.0.jar
aways exception like this:

2019-02-25 16:19:48.878 INFO Attaching the Elastic APM agent to 8848
Exception in thread "main" java.lang.IllegalStateException: No compatible attachment provider is available
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:389)
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:248)
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:223)
at co.elastic.apm.attach.ElasticApmAttacher.attach(ElasticApmAttacher.java:54)
at co.elastic.apm.attach.RemoteAttacher.main(RemoteAttacher.java:64)

thanks for help

1 Like

Hi and thanks for your input.
Please provide more details -

  • JVM vendor and version used to run the attacher jar
  • JVM vendor and version used to run the Java application you are trying to attach to
  • the exact command line and options you use for running the attacher

Thanks.

Thanks for help.
My attacher jar and Java application runing in the same JVM.
JVM: openjdk version "1.8.0_161"

command lines:
[ec2-user@ip-192-168-2-15 apm-agent-1.4.0]$ java -jar apm-agent-attach-1.4.0.jar -l
8256 /home/ec2-user/app/fps-batch/app/fps-batch.jar
20209 apm-agent-attach-1.4.0.jar
8082 /home/ec2-user/app/dk-trader/app/fps-dk-trader.jar
20021 /home/ec2-user/app/fps-admin/app/fps-admin.war
7803 /home/ec2-user/app/df-trader/app/fps-df-trader.jar
20221 sun.tools.jps.Jps

[ec2-user@ip-192-168-2-15 apm-agent-1.4.0]$ java -jar apm-agent-attach-1.4.0.jar -p 8848
2019-02-25 18:25:31.638 INFO Attaching the Elastic APM agent to 8848
Exception in thread "main" java.lang.IllegalStateException: No compatible attachment provider is available
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:389)
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:248)
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:223)
at co.elastic.apm.attach.ElasticApmAttacher.attach(ElasticApmAttacher.java:54)
at co.elastic.apm.attach.RemoteAttacher.main(RemoteAttacher.java:64)

[ec2-user@ip-192-168-2-15 apm-agent-1.4.0]$ java -jar apm-agent-attach-1.4.0.jar -i '.*/fps-dk-trader.jar' --continuous
2019-02-25 18:24:24.960 DEBUG Not attaching the Elastic APM agent to JvmInfo{pid='8256', packageOrPath='/home/ec2-user/app/fps-batch/app/fps-batch.jar'}, because it is not included or excluded.
2019-02-25 18:24:24.963 DEBUG Not attaching the Elastic APM agent to JvmInfo{pid='20301', packageOrPath='apm-agent-attach-1.4.0.jar'}, because it is not included or excluded.
2019-02-25 18:24:24.963 DEBUG Not attaching the Elastic APM agent to JvmInfo{pid='7803', packageOrPath='/home/ec2-user/app/df-trader/app/fps-df-trader.jar'}, because it is not included or excluded.
2019-02-25 18:24:24.963 INFO Attaching the Elastic APM agent to JvmInfo{pid='8082', packageOrPath='/home/ec2-user/app/dk-trader/app/fps-dk-trader.jar'} with arguments null
java.lang.IllegalStateException: No compatible attachment provider is available
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.install(ByteBuddyAgent.java:389)
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:248)
at co.elastic.apm.attach.bytebuddy.agent.ByteBuddyAgent.attach(ByteBuddyAgent.java:223)
at co.elastic.apm.attach.ElasticApmAttacher.attach(ElasticApmAttacher.java:54)
at co.elastic.apm.attach.RemoteAttacher.onJvmStart(RemoteAttacher.java:128)
at co.elastic.apm.attach.RemoteAttacher.attachToNewJvms(RemoteAttacher.java:101)
at co.elastic.apm.attach.RemoteAttacher.main(RemoteAttacher.java:68)
2019-02-25 18:24:32.246 DEBUG Not attaching the Elastic APM agent to JvmInfo{pid='20427', packageOrPath='/home/ec2-user/app/fps-admin/app/fps-admin.war'}, because it is not included or excluded.

thanks

Hi ,My problem has been solved after that I changed my jvm to oracle JDK (java version "1.8.0_101").
but the public support in https://www.elastic.co/guide/en/apm/agent/java/current/supported-technologies-details.html said open JDK 8 is supported, made me confused.

You are absolutely right, this is a source of confusion. The page you referenced is about what JVMs we work on properly, so if you used the javaagent option, it would definitely be expected to work.

We still need to figure out where it works and where it doesn't, and whether there is something we can do where it does not, which is part of the reason this setup option has the disclaimer This installation method is experimental.

Thanks a lot for your valuable input!

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