apm-agent-java: Bug: incompatibility with OpenJDK 1.8.0_242 (AdoptOpenJDK)

Describe the bug

java-agent 1.17.0 is incompatible with OpenJDK 1.8.0_242 (AdoptOpenJDK). if I launched a tomcat server (8.5.54) with java-agent 1.17.0, and OpenJDK 1.8.0_242 (AdoptOpenJDK), web applications are not started. If I run the same tomcat server with same apps, but with OpenJDK 1.8.0_212 (AdoptOpenJDK) or Oracle JDK 1.8.0_202, it works fine.

Steps to reproduce

Just start tomcat server with above configuration.

Expected behavior

tomcat starts cleanly and especially web apps are loaded.

Debug logs

I see no tomcat log at all at startup (when used with OpenJDK 1.8.0_212, I get tomcat startup logs).

APM logs:

2020-06-19 13:45:50,557 [main] INFO  co.elastic.apm.agent.util.JmxUtils - Found JVM-specific OperatingSystemMXBean interface: com.sun.management.OperatingSystemMXBean
2020-06-19 13:45:52,384 [main] INFO  co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.17.0 as my-project on Java 1.8.0_242 (AdoptOpenJDK) Linux 2.6.32-754.29.2.el6.x86_64
2020-06-19 13:45:52,475 [main] INFO  co.elastic.apm.agent.impl.ElasticApmTracer - Tracer switched to RUNNING state

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 27 (13 by maintainers)

Most upvoted comments

@eyalkoren sorry, totally forgot to reply. Your snapshot is running since 2 July ~14:00 without any issue.

I will try to test your snapshot fix next Tuesday.

@eyalkoren

That’s all I can find with the key delay_initialization.

[...]
2020-06-30 10:49:32,834 [elastic-apm-tracer-initializer] INFO  co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM 1.17.1-SNAPSHOT as dev-valuemation on Java 1.8.0_191 (Oracle Corporation) Linux 3.10.0-957.1.3.el7.x86_64
[...]
30-Jun-2020 10:56:55.675 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Delastic.apm.delay_initialization=5000
**** System Properties :
[...]
elastic.apm.delay_initialization : 5000

I guess we should look into this message:

2020-06-30 10:56:59,778 [elastic-apm-tracer-initializer] WARN  co.elastic.apm.agent.configuration.StartupInfo - DEPRECATION WARNING: delay_initialization: '5000' (source: Java System Properties) is not using a time unit. Please use one of 'ms', 's' or 'm'.

That’s what I can find when searching for 5000. Don’t know if all lines are relevant, if so, I will send you the log per mail.

[...]
#2020-06-30 10:50:24.543#1#S3#<unknown>#Failed getting connection of sessions: [PROD, EXPORT_ORIG, TEST, ARCHIVE, CTM, INT]
	Long request threshold: 5000ms
[...]
A lot of those:
2020-06-30 10:50:23,201 [elastic-apm-circuit-breaker] TRACE co.elastic.apm.agent.impl.circuitbreaker.CircuitBreaker - Scheduling next stress monitor polling in 5000s
[...]

Those messages are just there two times, so yeah! it works as expected from you 😉

2020-06-30 10:56:54,735 [elastic-apm-tracer-initializer] INFO  co.elastic.apm.agent.impl.ElasticApmTracer - Delaying initialization of tracer for 5000ms` is in the log, one time. 
2020-06-30 10:56:59,736 [elastic-apm-tracer-initializer] INFO  co.elastic.apm.agent.impl.ElasticApmTracer - end wait