版本:
我可以使用Spring Boot应用程序将所有内容报告给Spring Boot Admin。只有一件不起作用,那就是JMX Bean管理。从文档中:
要在管理界面中与JMX Bean交互,您必须包含Jolokia 在您的应用程序中。由于Jolokia是基于servlet的,因此不提供支持 用于反应性应用。如果您正在使用 spring-boot-admin-starter-client如果没有的话,它将为您安装 将Jolokia添加到您的依赖项中。
我知道它不适用于Reactive WebFlux,但我使用的是将Undertow用作Servlet容器的基于Servlet的示例。在pom.xml中进行配置:
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-server</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-starter-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-undertow</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
正如我所说,除1件事外,其他所有东西都在工作,那就是JMX控件。我收到以下错误,但找不到任何原因或记录原因?任何帮助将不胜感激!
答案 0 :(得分:0)
使用以下参数启动程序:
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.authenticate=false
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.local.only=false
-Dcom.sun.management.jmxremote.port=1099
并且(如果使用docker / kubernetes)公开端口1099