Abhishek Abhishek - 2 months ago 25
Java Question

Unable to connect to remote server from Hawtio dashboard

I have a camel web application running on remote-server-1 which is a tomcat 8 server. I have attached a jolokia jvm agent on this tomcat as follows-

java -jar jolokia-jvm-1.3.5-agent.jar start <PID>

I get the following response on my local machine by accessing

"request": {
"type": "version"
"value": {
"agent": "1.3.5",
"protocol": "7.2",
"config": {
"maxDepth": "15",
"discoveryEnabled": "true",
"maxCollectionSize": "0",
"agentId": "***.***.***.**-16224-35a7a114-jvm",
"debug": "false",
"agentType": "jvm",
"historyMaxEntries": "10",
"agentContext": "\/jolokia",
"maxObjects": "0",
"debugMaxEntries": "100"
"info": {
"product": "tomcat",
"vendor": "Apache",
"version": "8.0.35"
"timestamp": 1491307702,
"status": 200

I also have hawtio.war deployed on my local-tomcat8.5. When I try to connect to this remote agent, I am redirected to login page. I am not able to figure out where am I going wrong. Can anyone help me with this?

Answer Source

Since hawtio 1.5.0 you need to add remote hosts to the hawtio.proxyWhitelist system property.


hawtio.proxyWhitelist hawtio 1.5.0 - Comma-separated whitelist for target hosts that the remote JVM connect plugin ProxyServlet can connect to (default localhost, All hosts that are not listed in this whitelist are denied to connect for security reasons. This option can be set to * to restore old behavior and whitelist all hosts.

If you are using hawtio.war then modify its WEB-INF/web.xml like this:

      Comma-separated list of allowed target hosts. It is required for security.
      '*' allows all hosts but keep in mind it's vulnerable to security attacks.