问题描述
我在RHEL73上安装了eap7.1,一切正常,但是无法使用jconsole连接服务器实例,我没有找到与如何在eap7.1上设置jmx组件相关的任何内容,但是在这里找到了eap6的相关内容是我发现的要点:
I installed eap7.1 on RHEL73, everything works fine, but failed to use jconsole to connect server instance, I didn't find anything related with how to set jmx component on eap7.1, but found something for eap6, here is main points I found:
-
应禁用管理绑定并启用远程绑定:
Should disable management binding and enable an remote binding:
添加选项作为eap服务器启动选项:-Djavax.management.builder.initial = org.jboss.system.server.jmx.MBeanServerBuilderImpl-Djboss.platform.mbeanserver
Add option as eap server startup option:-Djavax.management.builder.initial=org.jboss.system.server.jmx.MBeanServerBuilderImpl-Djboss.platform.mbeanserver
使用$ JBOSS_HOME/bin/jconsole.sh启动jconsole
Use $JBOSS_HOME/bin/jconsole.sh to startup jconsole
但是我总是以jconsole响应失败,因为与服务的连接:jmx:remote://192.168.56.11:4447没有成功"
But I always failed with jconsole reponse as " the connection to service:jmx:remote://192.168.56.11:4447 did not succeed"
这是domain.xml的关键点
Here is key point of domain.xml
...
<subsystem xmlns="urn:jboss:domain:remoting:4.0">
<endpoint/>
<connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
<http-connector name="http-remoting-connector" connector-ref="default" security-realm="ApplicationRealm"/>
</subsystem>
...
<subsystem xmlns="urn:jboss:domain:jmx:1.3">
<expose-resolved-model/>
<expose-expression-model/>
<remoting-connector use-management-endpoint="false"/>
</subsystem>
...
<socket-binding-group name="ha-sockets" default-interface="public">
...
<socket-binding name="remoting" port="4447"/>
...
</socket-binding-group>
服务器成功启动,并显示以下日志
server startup successfully with the following log
"INFO [org.jboss.as.remoting] (MSC service thread 1-1) WFLYRMT0001: Listening on 192.168.56.11:4447"
netstat -an显示4447已准备就绪.
netstat -an shows 4447 is ready.
以下是我遵循的关于eap6的一些指南:
The following is some guides on eap6 I followed:
https://access.redhat.com/solutions/149973
https://access.redhat.com/solutions/443033
https://access.redhat.com/solutions/413283
https://kb.novaordis.com/index.php/JMX_Access_to_Domain_Mode_EAP_7_Server_Node(this is for eap7)
用于eap7.1的JMX上有什么特别之处吗?
Is there anything special on JMX for eap7.1?
最诚挚的问候
Lan
推荐答案
您可以使用管理领域以默认配置将jconsole连接到EAP 7.1.您只需要:
You can connect the jconsole to EAP 7.1 with default configuration using the management realm. You just have to:
- 通过
$ JBOSS_HOME/bin/add-user.sh
添加管理用户 - 启动EAP
- 连接到jmx服务地址
service:jmx:remote + http://127.0.0.1:9990
通过$ JBOSS_HOME/bin/jconsole.sh
使用上面步骤中定义的凭据
- add a management user, via
$JBOSS_HOME/bin/add-user.sh
- start EAP
- connect to jmx service address
service:jmx:remote+http://127.0.0.1:9990
via$JBOSS_HOME/bin/jconsole.sh
using credentials defined in above step
n.b .:协议可能与以前的eap版本不同
n.b.: The protokoll may differ from previous versions of eap
这篇关于无法使用jconsole连接到JBoss eap7.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!