Dynatrace tips
Tips and workarounds from Dynatrace users for Dynatrace users.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Java applications fail to start after OneAgent upgrade on Alpine Linux (musl libc)

t_pawlak
Leader

Abstract

This article explains an issue where Java applications running in containers fail to start after upgrading Dynatrace OneAgent to version 1.327.56+ when older Alpine Linux (musl libc) images and outdated JDK versions are used.
It covers the root cause, affected scenarios, and recommended preventive actions.

Problem

After upgrading Dynatrace OneAgent to version 1.327.56, Java applications running in containers may enter CrashLoopBackOff. The JVM fails to start with an error similar to:

Error occurred during initialization of VM
Error relocating liboneagentjava.so: getrandom: symbol not found

The issue typically occurs when all of the following conditions are met:

  • Container image based on Alpine Linux 3.8.x / 3.9.x
  • libc: musl
  • Java: OpenJDK 8u181
  • Dynatrace OneAgent 1.327.56 or newer
  • Java Agent auto-injection enabled

Observed behavior:

  • Alpine 3.8.1 + OpenJDK 8u181 → fails
  • Alpine 3.9.4 + OpenJDK 8u212 → works
  • OneAgent 1.327.44 → works

Root cause

Starting with OneAgent 1.327.56, the Dynatrace Java Agent (liboneagentjava.so) relies on the getrandom() system call, which:

  • is not available in older versions of musl libc
  • causes JNI library loading to fail
  • results in a hard JVM startup failure

Additionally:

  • older JDK builds (such as 8u181) have limited compatibility with newer system libraries and security mechanisms
  • Alpine Linux versions below 3.10 are outside the official Dynatrace support scope

According to the Dynatrace Technology Support Matrix:

  • Alpine Linux (musl libc) for containers: 3.10 – 3.21

Support matrix 

Resolution

To prevent similar issues in the future, the following actions are recommended:

1. Upgrade container base images

  • Alpine Linux minimum 3.10 (3.18+ recommended)
  • Or switch to glibc-based images, such as:
    • Debian 11/12
    • Ubuntu 22.04
    • Red Hat

2. Upgrade Java runtime

  • Minimum OpenJDK 8u212
  • Prefer newer LTS versions (11 / 17) if supported by the application

3. Avoid EOL images and runtimes

Older Alpine and JDK versions:

  • are not tested
  • are not supported
  • contain known security vulnerabilities (CVEs)

4. Temporary workaround - Roll back OneAgent

  • Downgrading to 1.327.44 resolves the issue

5. Workaround (GUI-based, no container image changes required):

If upgrading the Alpine base image or JDK is not immediately possible, the issue can be temporarily mitigated by disabling monitoring for the affected Java process directly in the Dynatrace GUI.

Steps:

1. Go to

  • Settings → Processes and containers → Process detection

2. Create a new exclusion rule

3. Scope the rule to:

  • a specific process group
  • or a command line / executable

4. Disable:

  • Deep process monitoring
  • Java agent / code module injection for that process

After saving the rule:

  • the JVM starts without loading the Dynatrace Java Agent
  • the application starts successfully
  • the getrandom: symbol not found error is avoided

Why this matters

  1. Stable application startup and monitoring
  2. Improved security posture
  3. Safe future Dynatrace upgrades
  4. Vendor-supported configuration

If the issue persists:

  • verify Alpine version (/etc/os-release)
  • verify JDK version (java -version)
  • confirm OneAgent version
  • open a Dynatrace Support ticket and reference:
    • Alpine < 3.10
    • musl libc
    • getrandom: symbol not found error
1 REPLY 1

gianluca_maranz
Newcomer

The question is: why use a 

getrandom: symbol not found

....and stop processes, instead of use a "manual" random function? Ofc joking, btw it should be fixed soon.

Featured Posts