JConsole到JBoss EAP的远程连接 [英] JConsole remote connection to JBoss EAP
问题描述
我正在尝试连接到服务器上运行的远程jboss实例.我正在使用以下连接URL
I am trying to connect to a remote jboss instance running on a server. I am using the following connection URL
service:jmx:remoting-jmx://90.214.64.170:9999
service:jmx:remoting-jmx://90.214.64.170:9999
执行此操作时,在控制台窗口中出现以下2个错误
When i do this i get the following 2 errors in the console window
选择不安全后,我会看到这个
After selecting insecure i am presented with this
在通过jconsole连接之前,我已经进入我的jboss服务器的bin目录并运行./jconsole.sh
,它将以下内容输出到命令行
I have, prior to connecting via jconsole also gone to the bin directory of my jboss server and run ./jconsole.sh
which outputs the following to the command line
CLASSPATH /usr/bin/java/jdk1.8.0_11/lib/jconsole.jar:/usr/bin/java/jdk1.8.0_11/lib/tools.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/remoting-jmx/main/remoting-jmx-1.1.2.Final-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/remoting3/main/jboss-remoting-3.2.18.GA-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.1.2.GA-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/xnio/main/xnio-api-3.0.7.GA-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/xnio/nio/main/xnio-nio-3.0.7.GA-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/sasl/main/jboss-sasl-1.0.3.Final-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/marshalling/main/jboss-marshalling-1.4.2.Final-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/marshalling/river/main/jboss-marshalling-river-1.4.2.Final-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/as/cli/main/jboss-as-cli-7.3.0.Final-redhat-14.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/staxmapper/main/staxmapper-1.1.0.Final-redhat-2.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/as/protocol/main/jboss-as-protocol-7.3.0.Final-redhat-14.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/dmr/main/jboss-dmr-1.2.0.Final-redhat-1.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/as/controller-client/main/jboss-as-controller-client-7.3.0.Final-redhat-14.jar:/var/opt/jboss/modules/system/layers/base/org/jboss/threads/main/jboss-threads-2.1.1.Final-redhat-1.jar
我不确定我还能尝试什么(也打开了端口9999)来使其正常工作,是否有人有任何建议或提示可帮助解决此问题?
I am not sure what else i can try (having also opened port 9999) to get this to work, does anyone have any advice or hints that might help resolve this?
谢谢
编辑
已将我的standalone.conf文件修改为此
Having modified my standalone.conf file to this
#
# Specify options to pass to the Java VM.
#
if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="-Xms1303m -Xmx1303m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=9999"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.authenticate=false"
else
echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"
fi
我仍然无法连接-出现与上述相同的错误
I am still unable to connect - with the same errors as above
推荐答案
我找到了答案-至少是一个解决方案.
I have found the answer - well at least a solution.
Having read through the new JBOSS release notes herefor EAP 6.3 I found the following;
还原的ServiceMBean帮助程序类org.jboss.as.system-jmx 引入了模块来还原可用于以下对象的帮助程序类 有助于用户创建MBean的JBoss EAP的早期版本.
Restored ServiceMBean Helper Classes The org.jboss.as.system-jmx module has been introduced to restore helper classes available in earlier versions of JBoss EAP that assist users in creating MBeans.
我们所做的是部署了一个新的独立实例-全新安装6.3,然后按照本指南进行操作;
What we did was deploy a new standalone instance - clean install of 6.3 and then followed this guide;
https://planet.jboss.org/post/jmx_connections_to_jboss_as
我们不需要添加任何可选参数,无需对standalone.sh进行任何修改,也无需对standalone.xml进行任何修改.
We needed no optional parameters to be added, no modifications to standalone.sh and no modifications for standalone.xml.
我看到某人对错误答案有5票赞成票-这仅仅是为了获得赏金吗?!
I see someone has 5 up votes for an incorrect answer - is this just so the bounty is awarded?!
这篇关于JConsole到JBoss EAP的远程连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!