eclipse-jkube / jkube

Build and Deploy java applications on Kubernetes
https://www.eclipse.dev/jkube/
Eclipse Public License 2.0
775 stars 523 forks source link

Warning shown about Jolokia when running a Quarkus App #1335

Open jcordes73 opened 2 years ago

jcordes73 commented 2 years ago

Description

Info

* Kubernetes / Red Hat OpenShift setup and version :
OpenShift 4.9

* If it's a bug, how to reproduce :
- Create a Quarkus app
- Deploy to OpenShift

A warning in shown in the pod logs:
```shell
INFO exec  java -Dquarkus.http.host=0.0.0.0 
-javaagent:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar=config=/opt/jboss/container/jolokia/etc/jolokia.properties
 -Xms32m -Xmx128m -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 
-XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 
-XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m 
-XX:ParallelGCThreads=1 
-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 
-XX:CICompilerCount=2 -XX:+ExitOnOutOfMemoryError -cp "." -jar 
/deployments/quarkus-run.jar
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jolokia.util.ClassUtil 
(file:/usr/share/java/jolokia-jvm-agent/jolokia-jvm.jar) to constructor 
sun.security.x509.X500Name(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
WARNING: Please consider reporting this to the maintainers of 
org.jolokia.util.ClassUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal
 reflective access operations

This should have been fixed in Jolokia 1.7.0

manusa commented 2 years ago

This is odd, the base image we use in Eclipse JKube 1.7.0 no longer has this problem. Are you sure you're using Eclipse JKube 1.7.0 and that the base image for your container is quay.io/jkube/jkube-java:0.0.13?

manusa commented 2 years ago

I'm not sure if you're reporting the issue for this repo https://github.com/jcordes73/camel-quarkus-openapi

The following line is the culprit: https://github.com/jcordes73/camel-quarkus-openapi/blob/47a384e8fee26cd4c604d3c94b01dbf37393224e/pom.xml#L18

That base image is providing the older version of Jolokia. You could try our Java 11 base image (which uses an up-to-date version of Jolokia): quay.io/jkube/jkube-java-11:0.0.13