I'm trying to connect my Jolokia JVM agent with an hawtio frontend.
The agent runs inside of a docker container with the distroless java 11 image.
I start the application like this:
ENTRYPOINT ["java","-javaagent:jolokia-agent.jar","-jar","service1.jar"]
The Jolokia version is 1.6.2.
When I start up the application, this appears first.
| I> No access restrictor found, access to any MBean is allowed
| Jolokia: Agent started with URL http://127.0.0.1:8778/jolokia/
In my docker-compose.override file, I forward the port:
services:
service1:
ports:
- "8778:8778"
However, when I try to access the endpoint from the browser, it cannot reach it.
When I try curl curl "http://localhost:8778/jolokia
from inside the container, I also cannot reach it.