简体   繁体   English

如何配置JBoss 6.3.0GA以使用RMI JMX?

[英]How to configure JBoss 6.3.0GA to use RMI JMX?

As you can see, there's the new instructions: 如您所见,有新的说明:
https://docs.jboss.org/author/display/AS71/JMX+subsystem+configuration https://docs.jboss.org/author/display/AS71/JMX+subsystem+configuration
And the old RMI instructions: 和旧的RMI说明:
https://docs.jboss.org/author/pages/viewpage.action?pageId=21627109 https://docs.jboss.org/author/pages/viewpage.action?pageId=21627109

I can get the new instructions working, but we use nagios, which only allows checking JMX via RMI, so I need to get RMI JMX working. 我可以使新指令正常工作,但是我们使用nagios,它仅允许通过RMI检查JMX,因此我需要使RMI JMX运行。

Does anyone have a solution for this? 有人有解决方案吗? I can't use the old instructions because it says <jmx-connector> is no longer supported. 我不能使用旧的说明,因为它说不再支持<jmx-connector>

I've added the following to my JAVA_OPTS on JBoss startup: 我在JBoss启动时将以下内容添加到我的JAVA_OPTS中:

JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=12345 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false" -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Dorg.jboss.logging.Logger.pluginClass=org.jboss.logging.logmanager.LoggerPluginImpl -Djava.rmi.server.hostname=10.20.2.50 JAVA_OPTS =“$ JAVA_OPTS -Dcom.sun.management.jmxremote.port = 12345 -Dcom.sun.management.jmxremote.authenticate = false -Dcom.sun.management.jmxremote.ssl = false”-Djava.util.logging.manager = org.jboss.logmanager.LogManager -Dorg.jboss.logging.Logger.pluginClass = org.jboss.logging.logmanager.LoggerPluginImpl -Djava.rmi.server.hostname = 10.20.2.50

but i can't get jconsole to connect to service:jmx:rmi:///jndi/rmi://10.20.2.50:12345/jmxrmi 但我不能让jconsole连接到服务:jmx:rmi:/// jndi / rmi://10.20.2.50:12345 / jmxrmi

(PS. If anyone with redhat paywall access could report back on the answer here: https://access.redhat.com/solutions/263763 that would be swell :P) (PS。如果有人使用redhat paywall访问权限,可以在此处报告答案: https//access.redhat.com/solutions/263763 ,这将是膨胀的:P)

To connect to JMX the URL entered should be in the format 要连接到JMX,输入的URL应采用格式

service:jmx:remoting-jmx://{host_name}:{port}

Standalone mode 独立模式

where {port} is the native management interface of the AS7 installation being monitored (default=9999). 其中{port}是要监视的AS7安装的本机管理界面(默认值= 9999)。

Domain mode 域模式

where {port} is the JMX subsystem interface of the AS7 installation being monitored (first server=4447, port-offset=150 next server). 其中{port}是受监视的AS7安装的JMX子系统接口(第一个服务器= 4447,端口偏移= 150下一个服务器)。

<subsystem xmlns="urn:jboss:domain:jmx:1.1">
   <show-model value="true"/>
   <remoting-connector use-management-endpoint="false"/>
</subsystem>

Both modes 两种模式

Outside localhost you have to set -Djboss.bind.address.management or inside xml (standalone.xml / host.xml). 在localhost之外,您必须设置-Djboss.bind.address.management或在xml(standalone.xml / host.xml)中。

Once connected the capabilities provided by jconsole can be used as normal. 连接后,jconsole提供的功能可以正常使用。

Authentication 认证

The connector is making use of JBoss Remoting to communicate with the server, for this reason the exact same authentication mechanisms as are used by the CLI will apply here. 连接器使用JBoss Remoting与服务器通信,因此CLI将使用与CLI使用的完全相同的身份验证机制。

Local 本地

For processes running local to the AS7 installation we support a local authentication mechanism which allows clients to verify their identity by sharing a token on the filesystem with the server - this mechanism runs silently without any further user interaction required. 对于在AS7安装本地运行的进程,我们支持本地身份验证机制,允许客户端通过在文件系统上与服务器共享令牌来验证其身份 - 此机制以静默方式运行,无需任何进一步的用户交互。

Username / Password 用户名密码

Where local authentication is not possible such as if the client is running as a different user than the AS7 process or is running on a remote installation by default the next mechanism to be used is username / password based. 在无法进行本地认证的情况下,例如,如果客户端以与AS7进程不同的用户身份运行或默认情况下在远程安装上运行,则要使用的下一个机制是基于用户名/密码的。 Where this mechanism is used the username and password of a user in the ManagementRealm if using the default management connector (port 9999) or in the ApplicationRealm if using the remoting connector (port 4447) should be supplied in the boxes on the 'New Connection' screen before the 'Connect' button is clicked. 如果使用此机制,则应在“新连接”的框中提供用户的用户名和密码(如果使用默认管理连接器(端口9999),则在ManagementRealm中;如果使用远程管理连接器(端口4447),则在ApplicationRealm中)。单击“连接”按钮之前的屏幕。

The $JBOSS_HOME/bin/add-user.sh (Linux) or $JBOSS_HOME/bin/add-user.bat (Windows) scripts can be used to add these users. 可以使用$JBOSS_HOME/bin/add-user.sh (Linux)或$JBOSS_HOME/bin/add-user.bat $JBOSS_HOME/bin/add-user.sh $JBOSS_HOME/bin/add-user.bat (Windows)脚本来添加这些用户。 Make sure to choose between Management User and ManagementRealm vs Application User and ApplicationRealm depending on whether you're using the default management connector or the remoting connector (usually used with domain mode or when connecting remotely). 确保在管理用户和ManagementRealm与Application User和ApplicationRealm之间进行选择,具体取决于您使用的是默认管理连接器还是远程连接器(通常用于域模式或远程连接时)。

Necessary libraries to connect JMX over JBoss Remoting 通过JBoss Remoting连接JMX所需的库

The JMX MBeanServer is accessible using JBoss Remoting through the management connection. 可以通过管理连接使用JBoss Remoting访问JMX MBeanServer。 Therefore, it is necessary to add the following libaries from the modules directory of the EAP6 / AS7 distribution to the classpath of the monitoring application: 因此,有必要将以下libaries从EAP6 / AS7发行版的modules目录添加到监视应用程序的类路径中:

org/jboss/remoting3/remoting-jmx
org/jboss/remoting3
org/jboss/logging
org/jboss/xnio
org/jboss/xnio/nio
org/jboss/sasl
org/jboss/marshalling
org/jboss/marshalling/river

Ref: Using jconsole to connect to JMX on AS7 参考: 使用jconsole连接到AS7上的JMX

Other resource: Connecting VisualVM with a remote JBoss AS 7 / EAP6 JVM process 其他资源: 将VisualVM与远程JBoss AS 7 / EAP6 JVM进程连接

EDIT: 编辑:

JBoss EAP 5 supports JMX monitoring using RMI, where JBoss EAP 6 does not. JBoss EAP 5支持使用RMI进行JMX监控,而JBoss EAP 6则不支持。 EAP 6 uses “remoting-jmx” instead of “rmi”. EAP 6使用“ remoting-jmx”代替“ rmi”。

You should look for another solution, as SNMP, or proper plugin for nagios 您应该寻找另一种解决方案,如SNMP,或者适用于nagios的插件

See: 看到:

JVM monitoring via SNMP of JBoss EAP 6 worker nodes with pnp4nagios Template 使用pnp4nagios模板通过SNMP对JBoss EAP 6工作节点进行JVM监控

Jboss SAR MBean and Perl plug-in for Nagios compatible with Jboss 7.1.1 用于Nagios的Jboss SAR MBean和Perl插件与Jboss 7.1.1兼容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM