如何在 JROCKIT JVM 上激活 JMX 以使用 jconsole 进行访问?

发布于 2024-10-13 03:09:17 字数 313 浏览 7 评论 0原文

如何在 JROCKIT JVM 上激活 JMX 以使用 jconsole 进行访问?

如何激活的后续问题我的 JVM 上的 JMX 可以通过 jconsole 进行访问?

我问的主要原因是,因为如果我尝试使用激活的 JMX 运行 jboss (6.0.0.Final),并且 jboss 无法正确启动,我会收到奇怪的错误。所以可能是jboss的问题。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

゛时过境迁 2024-10-20 03:09:17

要做到这一点,同时支持各种潜在的网络配置挑战,以及与任何 JVM(大多数?)一起工作,最简单的方法是安装 JMXConnectorServer。现在您正在使用标准 J2SE 连接。

JBoss 6 的较旧版本内置了此支持,我不确定为什么 jboss 删除了它,但以下是重新创建它的方法。

  1. 找到 jar jboss-as-jbossas-jmx-remoting.jar 具有 org.jboss.jbossas / jboss-as-jbossas-jmx-remoting 的 Maven 签名。将其复制到 [jboss-home]/server/[your-server]/lib 目录。
  2. 创建一个如下所示的 jmx-connector-service.xml 文件,并将其放入 [jboss-home]/server/[your-server]/deploy 目录中。
    alt text

(抱歉,在为 stackoverflow 格式化 XML 时遇到问题)。

当服务器启动时,您会很早就看到这样的日志语句:

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

您可以调整绑定、注册表的使用、端口等,但现在您可以打开 JConsole 并连接到 service:jmx:rmi://10.213.14.95/jndi/ rmi://10.213.14.95:1090/jmxconnector

您可以在此处<找到有关该服务的更多信息< /a>.

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.
    alt text

(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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文