I’m in the process of embedding Hawtio in my Camel Spring Boot application. I followed the Hawtio getting started guide to setup configuration, but something is wrong as the Hawtio UI is empty when I bring it up (no metrics). I added the following properties to application.properties:
spring.jmx.enabled=true
management.endpoints.web.exposure.include=info,health,camelroutes,prometheus,hawtio,jolokia
And the following dependencies:
<dependency>
<groupId>io.hawt</groupId>
<artifactId>hawtio-springboot</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-management-starter</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.springboot</groupId>
<artifactId>camel-spring-boot-xml-starter</artifactId>
</dependency>
Hawtio pulls data from the Jolokia management endpoint which returns this response:
{“request”:{“type”:”version”},”value”:{“agent”:”2.0.2″,”protocol”:”7.3″,”details”:{“agent_version”:”2.0.2″,”agent_id”:”192.168.0.115-49016-52f67539-servlet”,”server_product”:”jetty”,”server_vendor”:”Eclipse”,”server_version”:”12.0.6″,”secured”:false,”url”:”http://192.168.0.115:8081/xxxxx/jolokia”},”id”:”192.168.0.115-49016-52f67539-servlet”,”config”:{“agentId”:”192.168.0.115-49016-52f67539-servlet”,”allowErrorDetails”:”false”,”includeStackTrace”:”false”},”info”:{“proxy”:{},”jmx”:{}}},”status”:200,”timestamp”:1715131260}
As you can see, the JMX object is empty, but why? I see all the MBeans in JConsole.
I do not see any errors or interesting messages in the log when pulling up the Hawtio UI:
2024-05-07T18:27:20.252-07:00 DEBUG 49016 --- [xxxxx] [ XNIO-1 task-2]
io.hawt.web.auth.LoginRedirectFilter : Check if path [/xxxxx/hawtio/index.html]
requires redirect
2024-05-07T18:27:20.252-07:00 DEBUG 49016 --- [xxxxx] [ XNIO-1 task-2]
io.hawt.web.filters.BaseTagHrefFilter : baseTagHref = /xxxxx/hawtio
2024-05-07T18:27:20.274-07:00 DEBUG 49016 --- [xxxxx] [ XNIO-1 task-2]
io.hawt.web.auth.SessionExpiryFilter : Accessing
[/xxxxx/hawtio/static/js/main.d0c4c242.js], hawtio
Or when I hit the Jolokia endpoint. Just this:
2024-05-07T18:23:50.315-07:00 DEBUG 49016 --- [xxxxx] [ XNIO-1 task-2]
io.hawt.web.auth.AuthenticationFilter : Handling request for path: /xxxxx/jolokia
2024-05-07T18:23:50.315-07:00 DEBUG 49016 --- [xxxxx] [ XNIO-1 task-2]
io.hawt.web.auth.AuthenticationFilter : No authentication needed for path: /xxxxx/jolokia
Everything looks ok, so what am I missing? Any help will be appreciated. Thanks!
Camel version: 4.5
Hawtio: 4.0.0
Spring Boot: 3.2.3
Jolokia: 2.0.2