VMware Cloud Community
jbweber2
Enthusiast
Enthusiast

jmx monitoring

I want to enable jmx monitoring of vCO in my development environment to take a peek at numbers in the workflow service while vco is under load.

I found the article Monitoring the vCenter Orchestrator Java Virtual Machine which seems to be for a much older version of vCO.

Is there any new guidance on enabling jmx on the vco appliance?

0 Kudos
1 Reply
jbweber2
Enthusiast
Enthusiast

After some investigation I was able to get things working, but I'm not sure if this is considered an approved method or not.

In the server.xml file found in /var/lib/vco/app-server/conf I added the following listener configuration to the server section. This will enable tc-server to expose jmx as a socket on a specific port. With authenticate set to false it doesn't use any of the configuration in the password file or access file parameters.

<Listener className="com.springsource.tcserver.serviceability.rmi.JmxSocketListener"

            port="6969"

            bind="192.168.0.100"

            useSSL="false"

            passwordFile="${catalina.base}/conf/jmxremote.password"

            accessFile="${catalina.base}/conf/jmxremote.access"

            authenticate="false"/>

Once I configured this things still weren't working, but I noticed this error when trying to restart vCO:

java.io.IOException: Cannot bind to URL [rmi://192.168.0.100:6969/jmxrmi]: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]

This indicated a configuration problem for jndi, and it looks like the properties were set for using jboss based application configuration and jboss libs aren't included with vCO.

I modified the catalina.properties file in /var/lib/vco/app-server/conf and changed the naming configuration to use apache/tomcat libraries instead of jboss.

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory -> java.naming.factory.initial=org.apache.naming.java.javaURLContextFactory

java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces -> java.naming.factory.url.pkgs=org.apache.naming

With these changes I was able to connect to jmx via jvisualvm without any issue.

0 Kudos