I am trying to use Jolokia as a proxy, but it appears to not be proxying my requests properly.
I am issuing post requests to a server with the Jolokia agent running on a container. When I request jvm stats like
I get back a response, but it appears to be from teh server the jolokia proxy is running on, not the endpoint I am trying to get data from. When I try listing the mbeans, or reading an mbean I can see in jconsole, I get a not found error of the style:
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java: 1095)
I have tested the target url, and I can connect to the server with jconsole, and view the mbeans I am trying to read. Is there something special I should be doing durring the set-up of jetty/jolokia to ensure that it knows it should be proxying these requests? is there a reason it would ignore the target and just read from the server the proxy is running in ?
Relevant setup here.
AgentServlet jolokiaServlet = new AgentServlet();
ServletHolder jolokiaHolder = new ServletHolder(jolokiaServlet);
ServletContextHandler handler = new ServletContextHandler(ServletContextHandler.SESSIONS);