开发者

How to activate JMX on my JROCKIT JVM for access with jconsole?

开发者 https://www.devze.com 2023-02-06 04:57 出处:网络
How to activate JMX on my JROCKIT开发者_运维知识库 JVM for access with jconsole? (somewhat a follow up question to How to activate JMX on my JVM for access with jconsole?)

How to activate JMX on my JROCKIT开发者_运维知识库 JVM for access with jconsole?

(somewhat a follow up question to How to activate JMX on my JVM for access with jconsole?)

The main reason I ask is, because I get strange errors if I try to run jboss (6.0.0.Final) with activated JMX, and jboss doesn't start correctly. So maybe it is a jboss problem.


The easiest way to do this, and at the same time support a variety of potential networking configuration challenges, as well as work with any JVM (most ?) is to install a JMXConnectorServer in the JBoss App Server. Now you're using standard J2SE connectivity.

Older builds of JBoss 6 had this support built in and I'm not sure why jboss removed it but here's how you can recreate it.

  1. Find the jar jboss-as-jbossas-jmx-remoting.jar which has a maven signature of org.jboss.jbossas / jboss-as-jbossas-jmx-remoting. Copy it to the [jboss-home]/server/[your-server]/lib directory.
  2. Create a file like jmx-connector-service.xml as outlined below and drop it into your [jboss-home]/server/[your-server]/deploy directory.

    How to activate JMX on my JROCKIT JVM for access with jconsole?

(Sorry, was having trouble formatting XML for stackoverflow).

When the server starts, you will see a log statement like this, pretty early on:

INFO [JMXConnectorServerService] JMX Connector server: service:jmx:rmi://10.213.14.95/jndi/rmi://10.213.14.95:1090/jmxconnector

You can tweak the bindings, the use of a registry, the ports etc, but now you can open JConsole and connect to service:jmx:rmi://10.213.14.95/jndi/rmi://10.213.14.95:1090/jmxconnector.

You can find more information on the service here.

0

精彩评论

暂无评论...
验证码 换一张
取 消