使用VisualVM连接到JBoss 7 [英] Connect to JBoss 7 using VisualVM

查看:125
本文介绍了使用VisualVM连接到JBoss 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有远程JBoss 7.1服务器,我想使用VisualVM或JConsole连接到该服务器.

I have remote JBoss 7.1 server and I would like to connect to this server by using VisualVM or JConsole.

我在Google上进行了一些搜索,找到了一些有关如何使用VisualVM或JCoonsole连接到JBoss 7.1的主题/教程,例如:

I googled a bit and found several threads/tutorials on how to connect to JBoss 7.1 by using VisualVM or JCoonsole, e.g.:

  • https://community.jboss.org/thread/171346?start=0&tstart=0
  • https://issues.jboss.org/browse/WFLY-895
  • https://community.jboss.org/wiki/UsingJconsoleToConnectToJMXOnAS7
  • http://blog.akquinet.de/2012/11/01/connecting-visualvm-with-a-remote-jboss-as-7-eap6-jvm-process/

不幸的是,我无法通过JMX连接到我的JBoss 7.1.

Unfortunately I had no luck in connecting to my JBoss 7.1 over JMX.

您对如何使用VisualVM连接到JBoss 7.1有任何想法吗?

Do you have any ideas how to connect to JBoss 7.1 with VisualVM?

我在standalone.conf.bat中添加了-Dcom.sun.management.jmxremote.port = 1090 -Dcom.sun.management.jmxremote.authenticate = false,但是我遇到了一个例外: 由以下原因引起:java.lang.IllegalStateException:LogManager的安装不正确 全部(您必须将系统属性"java.util.logging.manager"设置为"org.jboss.logmanager.LogManager").

I added -Dcom.sun.management.jmxremote.port=1090 -Dcom.sun.management.jmxremote.authenticate=false to standalone.conf.bat, but I got an exception: Caused by: java.lang.IllegalStateException: The LogManager was not properly inst alled (you must set the "java.util.logging.manager" system property to "org.jboss.logmanager.LogManager").

因此,我向JAVA_OPTS添加了另一个选项:-Dcom.sun.management.jmxremote.port = 1090 -Dcom.sun.management.jmxremote.authenticate = false -Djava.util.logging.manager = org.jboss.logmanager日志管理器 但我收到的例外是:

So, I added another option to JAVA_OPTS: -Dcom.sun.management.jmxremote.port=1090 -Dcom.sun.management.jmxremote.authenticate=false -Djava.util.logging.manager=org.jboss.logmanager.LogManager but the exception I receive is this:

Could not load Logmanager "org.jboss.logmanager.LogManager"
java.lang.ClassNotFoundException: org.jboss.logmanager.LogManager
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

推荐答案

找到了解决方案.我需要在standalone.conf.bat中将以下参数添加到JAVA_OPTS中:

Found a solution. I needed to add the following params to JAVA_OPTS in standalone.conf.bat:

-Dcom.sun.management.jmxremote.port=1090 ^
-Dcom.sun.management.jmxremote.authenticate=false ^
-Dcom.sun.management.jmxremote ^
-Dcom.sun.management.jmxremote.ssl=false ^
-Djava.util.logging.manager=org.jboss.logmanager.LogManager ^
-Xbootclasspath/p:<JBOSS_PATH>/modules/org/jboss/logmanager/main/jboss-logmanager-1.2.2.GA.jar ^
-Xbootclasspath/p:<JBOSS_PATH>/modules/org/jboss/logmanager/log4j/main/jboss-logmanager-log4j-1.0.0.GA.jar ^
-Xbootclasspath/p:<JBOSS_PATH>/modules/org/apache/log4j/main/log4j-1.2.16.jar -Djboss.modules.system.pkgs=org.jboss.logmanager

注1:在Unix上使用\代替^.

Note 1: Use \ instead of ^ on Unix.

注意2:将<JBOSS_PATH>替换为JBoss 7.x的安装路径.我的是c:/java/jboss-as-7.1.1.Final.

Note 2: Replace <JBOSS_PATH> with your JBoss 7.x installation path. Mine was c:/java/jboss-as-7.1.1.Final.

这篇关于使用VisualVM连接到JBoss 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆