APM Server version:
7.3.1
APM Agent language and version:
java 11 - elastic-apm-agent: 1.9.0
Original install method (e.g. download page, yum, deb, from source, etc.) and version:
docker 7.3.1
Fresh install or upgraded from other version?
docker 7.3.1
Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
Apm agent failed to start on open JDK 11
Steps to reproduce:
- create a basic helloworld project
- Launch this project using openJdk 11 and the apm agent 1.9.0:
java
-javaagent:agents/elastic-apm-agent-1.9.0.jar
-Delastic.apm.server_url=http://localhost:8200
-Delastic.apm.service_name=test
-Delastic.apm.application_packages=test
-jar helloworld.jar
Provide logs and/or server output (if relevant):
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
2019-09-02 16:07:16.723 [apm-server-healthcheck] INFO co.elastic.apm.agent.report.ApmServerHealthChecker - Elastic APM server is available: { "build_date": "2019-08-19T19:05:40Z", "build_sha": "ead4e8ba325a393bf1a83d0d0a4130114b5f778e", "version": "7.3.1"}
Failed to start agent
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at co.elastic.apm.agent.bci.AgentMain.init(AgentMain.java:85)
at co.elastic.apm.agent.bci.AgentMain.premain(AgentMain.java:54)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.NoClassDefFoundError: sun/misc/Unsafe
at co.elastic.apm.agent.shaded.lmax.disruptor.util.Util$1.run(Util.java:103)
at co.elastic.apm.agent.shaded.lmax.disruptor.util.Util$1.run(Util.java:100)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at co.elastic.apm.agent.shaded.lmax.disruptor.util.Util.<clinit>(Util.java:109)
at co.elastic.apm.agent.shaded.lmax.disruptor.RingBufferFields.<clinit>(RingBuffer.java:34)
at co.elastic.apm.agent.shaded.lmax.disruptor.dsl.Disruptor.<init>(Disruptor.java:137)
at co.elastic.apm.agent.report.ApmServerReporter.<init>(ApmServerReporter.java:106)
at co.elastic.apm.agent.report.ReporterFactory.createReporter(ReporterFactory.java:43)
at co.elastic.apm.agent.impl.ElasticApmTracerBuilder.build(ElasticApmTracerBuilder.java:117)
at co.elastic.apm.agent.bci.ElasticApmAgent.initialize(ElasticApmAgent.java:98)
... 12 more
hello