I have a camel application which is running in spring boot 2
and camel routes are visualized through hawtio
. And all actuator endpoints are exposed including jolokia endpoint
this application is completely working in local
and
when I try to access actuator endpoints in local http://localhost:8080/actuator/
, i could see below endpoint along with other 16 endpoints (such as health, info and so on)
"jolokia": {
"href": "http://localhost:8080/actuator/jolokia",
"templated": false
}
I have deployed the in same Openshift
, but when i try to access actuator endpoints in Openshift
i could see only 16 endpoints without jolokia endpoint
Application start up logs in local
INFO : Initializing Spring embedded WebApplicationContext
INFO : Root WebApplicationContext: initialization completed in 3543 ms
INFO : Registered '/actuator/jolokia' to jolokia-actuator-endpoint
INFO : Initialising hawtio services
INFO : Configuration will be discovered via system properties
INFO : Welcome to Hawtio 2.10.0
INFO : Starting hawtio authentication filter, JAAS authentication disabled
INFO : Initializing ExecutorService 'applicationTaskExecutor'
INFO : Detected and using LURCacheFactory: camel-caffeine-lrucache
INFO : Exposing 17 endpoint(s) beneath base path '/actuator'
Application start up logs in Openshift
INFO : Initializing Spring embedded WebApplicationContext
INFO : Root WebApplicationContext: initialization completed in 3543 ms
INFO : Initialising hawtio services
INFO : Configuration will be discovered via system properties
INFO : Welcome to Hawtio 2.10.0
INFO : Starting hawtio authentication filter, JAAS authentication disabled
INFO : Initializing ExecutorService 'applicationTaskExecutor'
INFO : Detected and using LURCacheFactory: camel-caffeine-lrucache
INFO : Exposing 16 endpoint(s) beneath base path '/actuator'
INFO : Registered '/actuator/jolokia' to jolokia-actuator-endpoint
is missing in Openshift
logs,
so clearly its not registered with spring boot actuator
Any idea why jolokia is not exposed via spring boot actuator
?
because of this hawtio
is not able to access camel routes (JMX).
Issue is resolved
Solution : Disable the default OpenJDK8 jolokia in Openshift
In Local
Application is not running in Openshift / Docker as an image, running as normal spring boot application in tomcat so I didn't face this issue.
In Openshift
Application is running in openshift / Docker as an image instance. The image is created with base openJDK 8 which has default jolokia enabled Red hat openshift reference
I have disabled it by overriding it with AB_JOLOKIA_OFF:true
in openshift environment variables.
or either
if you are using maven fabric8 plugin
in pom for building image then you can override jolokia properties it in pom itself (i haven't try it but its possible as per documents).