Openshift 开启换档时,Jolokia端点未通过弹簧靴执行器暴露

Openshift 开启换档时,Jolokia端点未通过弹簧靴执行器暴露,openshift,spring-boot-actuator,hawtio,jolokia,spring-boot-2,Openshift,Spring Boot Actuator,Hawtio,Jolokia,Spring Boot 2,我有一个camel应用程序,它在springboot2中运行,camel路径通过hawtio可视化。和所有执行器端点均暴露,包括jolokia端点 此应用程序完全在本地运行和 当我尝试访问本地http://localhost:8080/actuator/,我可以看到以下端点以及其他16个端点(如健康、信息等) 我在同一Openshift中部署了,但是当我尝试访问Openshift中的执行器端点时 我只能看到没有jolokia端点的16个端点 应用程序启动日志在local INFO : Initi

我有一个
camel应用程序,它在springboot2中运行
,camel路径通过
hawtio
可视化。和
所有执行器端点均暴露,包括jolokia端点

此应用程序完全在本地运行
和 当我尝试访问本地
http://localhost:8080/actuator/
,我可以看到以下端点以及其他16个端点(如健康、信息等)

我在同一Openshift中部署了
,但是当我尝试
访问Openshift中的执行器端点时
我只能看到没有jolokia端点的16个端点

应用程序启动日志在
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'
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'
应用程序启动日志在
Openshift

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'
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:Openshift
日志中缺少注册到jolokia致动器端点的“/exactor/jolokia”, 因此,很明显,其未在弹簧启动执行器上注册

你知道为什么jolokia没有通过弹簧启动执行器暴露吗

因此,hawtio无法访问骆驼路线(JMX)。

问题得到解决
解决方案:在Openshift中禁用默认的OpenJDK8 jolokia

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'
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'
在本地

应用程序并没有以映像的形式在Openshift/Docker中运行,而是像tomcat中的普通spring boot应用程序一样运行,所以我没有遇到这个问题

在Openshift中

应用程序正在openshift/Docker中作为映像实例运行。 该映像是使用基本openJDK 8创建的,它启用了默认的jolokia

我通过在openshift环境变量中使用
AB\u JOLOKIA\u OFF:true
覆盖它来禁用它

如果您在pom中使用
maven fabric8插件
来构建图像,那么您可以在pom中覆盖jolokia属性(我没有尝试过,但可以按照)

问题已解决
解决方案:在Openshift中禁用默认的OpenJDK8 jolokia

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'
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'
在本地

应用程序并没有以映像的形式在Openshift/Docker中运行,而是像tomcat中的普通spring boot应用程序一样运行,所以我没有遇到这个问题

在Openshift中

应用程序正在openshift/Docker中作为映像实例运行。 该映像是使用基本openJDK 8创建的,它启用了默认的jolokia

我通过在openshift环境变量中使用
AB\u JOLOKIA\u OFF:true
覆盖它来禁用它

如果您在pom中使用
maven fabric8插件
来构建图像,那么您可以在pom中覆盖jolokia属性(我没有尝试过,但可以按照)