Skip to content

Conversation

@tvernum
Copy link
Contributor

@tvernum tvernum commented Apr 19, 2023

The APM agent version 1.33.0 fails to start on JDK 20, which prevents the APM integration to work as expected. As a consequence, the tracing does not work.

When setting ELASTIC_APM_LOG_LEVEL=debug and
ELASTIC_APM_LOG_FILE=/tmp/log.txt, the agent log shows that there is an issue with accessing Unsafe (sorry I don't have the exact stack trace).

There was a few changes in APM agent regarding the security manager (SM) in recent versions, and updating the agent seems to make it work as expected.

However, there is one known caveat so far
(elastic/apm-agent-java#3074), keeping the agent with debug log level with ELASTIC_APM_LOG_LEVEL=debug makes it trigger another security exception when trying to establish connection with apm-server because the agent prints few details if a proxy is used or not (which is forbidden by default by the SM and isn't yet wrapped in a privileged call.

Backport of: #94716

Fixes elastic#94689. The APM agent version 1.33.0 fails to start on JDK 20, which prevents the APM integration to work as expected. As a consequence, the tracing does not work. When setting `ELASTIC_APM_LOG_LEVEL=debug` and `ELASTIC_APM_LOG_FILE=/tmp/log.txt`, the agent log shows that there is an issue with accessing `Unsafe` (sorry I don't have the exact stack trace). There was a few changes in APM agent regarding the security manager (SM) in recent versions, and updating the agent seems to make it work as expected. However, there is one known caveat so far (elastic/apm-agent-java#3074), keeping the agent with `debug` log level with `ELASTIC_APM_LOG_LEVEL=debug` makes it trigger another security exception when trying to establish connection with apm-server because the agent prints few details if a proxy is used or not (which is forbidden by default by the SM and isn't yet wrapped in a privileged call. Backport of: elastic#94716
@tvernum tvernum added :Core/Infra/Core Core issues without another label >upgrade v8.7.1 labels Apr 19, 2023
@tvernum tvernum requested a review from pugnascotia April 19, 2023 11:27
@elasticsearchmachine
Copy link
Collaborator

Hi @tvernum, I've created a changelog YAML for you.

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@elasticsearchmachine elasticsearchmachine added Team:Core/Infra Meta label for core/infra team v8.7.2 labels Apr 19, 2023
Copy link
Contributor

@pugnascotia pugnascotia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tvernum tvernum merged commit e4e7f0e into elastic:8.7 Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label Team:Core/Infra Meta label for core/infra team >upgrade v8.7.1 v8.7.2

4 participants