Question
jmx exporter error in coldfusion conatiner
i am trying to use jmx exporter in my coldfusion 2021, i have added to the jvm args like this
-javaagent:{application.home}/jmx/jmx.jar=9101:{application.home}/jmx/config.yaml
it works fine in an standalone ubuntu server, i can see the metrics exported at port 9101, but when i do the same inside docker container it give me error
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
Exception in thread "main" java.lang.reflect.InvocationTargetException at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513) at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525) Caused by: java.lang.NoClassDefFoundError: com/sun/net/httpserver/Authenticator at io.prometheus.jmx.JavaAgent.premain(JavaAgent.java:39) ... 6 more Caused by: java.lang.ClassNotFoundException: com.sun.net.httpserver.Authenticator at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 7 more
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
the docker conatiner is from official adobecoldfusion/coldfusion2021
jmx exporter is form prometheus
final goal ios to use kube-prometheus-stack with coldfusion in k8s cluster
