how to use jolokia-access.xml?

classic Classic list List threaded Threaded
1 message Options
khowpan khowpan
Reply | Threaded
Open this post in threaded view
|

how to use jolokia-access.xml?

This post was updated on .
I use jolokia-jvm-1.6.2-agent.jar for monitor corda.jar.
I run with commandline "java -jar -Xmx1024m -javaagent:/opt/corda/jolokia-jvm-1.6.2-agent.jar=port=7105,host=localhost,policyLocation=/opt/corda/jolokia-access.xml corda.jar"

Then I want to restrict host access to this running agent for list all data of JVM.
In jolokia-access.xml have information as below

<?xml version="1.0" encoding="UTF-8"?>
<restrict>
    <remote>
        <host>127.0.0.1</host> <-- localhost can't access jolokia jvm agent. why ?
        <host>18.142.0.171</host> <-- this is public ip of vm that I want to access jolokia jvm agent.
  </remote>
</restrict>

When I start with above commandline these messages will show all times.
I> No access restrictor found, access to any MBean is allowed

I try to change to public ip, private ip and host name but no one can use for restrict remote.

Please guide me. Thank you.