-
Bug
-
Resolution: Done-Errata
-
Major
-
UBI8 Containers 1.16.GA
-
None
-
False
-
-
False
-
-
The idea of JAVA_OPTS is to use it for our images to define your own tuning. However, this only seems to work for ubi9 images, not for ubi8:
$ podman run --rm -ti -e JAVA_OPTS="" registry.access.redhat.com/ubi8/openjdk-17 2>&1 | grep -C3 ERROR Starting the Java application using /opt/jboss/container/java/run/run-java.sh ... ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected) INFO exec -a "java" java -XX:MaxRAMPercentage=50.0 -XX:+UseParallelGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:+ExitOnOutOfMemoryError -cp "." -jar Error: -jar requires jar file specification Usage: java [options] <mainclass> [args...]
Note the lines with -XX:MaxRAMPercentage=50.0 etc, which shouldn't be there.
Contrast this with an ubi9 image run:
$ podman run --rm -ti -e JAVA_OPTS="" registry.access.redhat.com/ubi9/openjdk-17 2>&1 | grep -C3 ERROR
Starting the Java application using /opt/jboss/container/java/run/run-java.sh ...
ERROR Neither $JAVA_MAIN_CLASS nor $JAVA_APP_JAR is set and 0 JARs found in /deployments (1 expected)
INFO exec java -cp "." -jar
Error: -jar requires jar file specification
Usage: java [options] <mainclass> [args...]
*Expected Behaviour*
As with ubi9 image, don't add auto-tunings if JAVA_OPTS is empty (or has some value; if it has a value only that JVM flag should be present).
- relates to
-
OPENJDK-78 Default rhel8/ubi8 openjdk-11 JVM parameters aren't suitable
- Closed
- links to
-
RHEA-2023:119189 Updated RHEL-8-based Middleware container images