Search code examples
google-cloud-platformgoogle-compute-enginejolokia

How to access Jolokia server on Google Compute Engine


I deployed application on Google Compute Engine. My VM has an internal IP and an external IP.

I am running my application with Jolokia:

java -javaagent:jolokia-jvm-1.6.0-agent.jar=host=0.0.0.0 -jar openmzn-processor-0.0.1-SNAPSHOT.jar
I> No access restrictor found, access to any MBean is allowed
Jolokia: Agent started with URL http://xxx.xxx.xxx.xxx(internal IP):8778/jolokia
....

I loaded hawtio server and tried connecting jolokia server.

Connection Information on QHawtio Console.
- Name: XXXX
- Scheme: http
- Host: External IP
- Port: 8778
- Path: /jolokia

When I tested connection, howtio application cannot access to jolokia.

How can I access jolokia application from my hawtio console?


Solution

  • Hawtio console has two type connection that is remote and discovery. Remote connection need to configure server information. In this case, I think that hawtio doesn't know internal ip address. Another connection is discovery. This connection find jolokia server automatically. First step, your interanl server information have to be identified through discovery function. And connection information by using discovery is shown on remote connection tab.