0
votes

I am running corda nodes using docker and I am trying to expose JMX metrics using Jolokia. My node.conf is the following:

devMode = true

jarDirs = ["/opt/corda"]
p2pAddress = "bankb:10002"
jmxMonitoringHttpPort = 10006

rpcSettings {
    useSsl = false
    address = "bankb:10003"
    adminAddress = "bankb:10005"
}

myLegalName = "O=BankB, L=London, C=GB"
keyStorePassword = "cordacadevpass"
trustStorePassword = "trustpass"

rpcUsers=[
    {
        username=corda
        password=corda_initial_password
        permissions=[
            ALL
        ]
    }
]

And I can see that Jolokia is starting, in the logs:

bankb       | I> Using policy access restrictor classpath:/jolokia-access.xml
bankb       | Jolokia: Agent started with URL http://127.0.0.1:10006/jolokia/

But I can't connect using the browser to the Jolokia endpoint and I believe it is because it is only binding to the internal network interface. How can I define the host that Jolokia will bind to if the corda config does not expose a why to configure the binding network interface ?

https://docs.corda.net/corda-configuration-file.html

2

2 Answers

1
votes

you must expose the port via docker.

If you look at https://docs.docker.com/engine/reference/commandline/run/ especially the section titled "Publish or expose port (-p, --expose)" it will explain how to expose ports to your host.

0
votes

Updating actual answer from Groups.io discussion

  1. Remove jmxMonitoringHttpPort argument from the node.conf file
  2. Start Corda process as follows:

    java -Dcapsule.jvm.args="-javaagent:drivers/jolokia-jvm-1.3.7-agent.jar=port=10006,host=0.0.0.0" -jar ${CORDA_HOME}/corda.jar 2>&1