且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

jmx似乎不与activeMQ一起使用

更新时间:2023-09-19 10:35:22

默认情况下,用于远程监控的密码身份验证处于启用状态。要禁用它,请在启动JVM时设置以下系统属性:
-Dcom.sun.management.jmxremote.authenticate = false,就像您在第二次测试中所做的一样,但是您需要添加系统属性-Dcom.sun.management .jmxremote

Password authentication for remote monitoring is enabled by default. To disable it, set the following system property when you start the JVM: -Dcom.sun.management.jmxremote.authenticate=false like you done in second test but you need to add system property -Dcom.sun.management.jmxremote

尝试将这些jvm参数添加到env文件并更新主机ip

Try to add these jvm param to env file and update host ip

-Djava.net。 preferredIPv4Stack = true -Djava.rmi.server.hostname = XXXX

-Djava.net.preferIPv4Stack=true -Djava.rmi.server.hostname=X.X.X.X

更新

SO,请继续,我认为您尝试的第一个步骤是***的,要使其正常工作,请执行以下步骤:

SO, to resume, i think that the FIRST step you tried is the best, for making it working these are the steps :


  1. 还原所有jmx env文件更改,如下所示:

  1. revert all jmx env file changes, like this :


    # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.port=1099 "
    # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.password.file=${ACTIVEMQ_CONF}/jmx.password"
    # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.access.file=${ACTIVEMQ_CONF}/jmx.access"
    # ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote.ssl=false"
    ACTIVEMQ_SUNJMX_START="$ACTIVEMQ_SUNJMX_START -Dcom.sun.management.jmxremote"



  • &lt ;经纪人useJmx = true ...




    <managementContext>
      <managementContext createConnector="true"  connectorPort="1099" />
    </managementContext>
    


    验证AMQ日志中是否有

    verify that in AMQ logs you have


    信息| JMX控制台可以连接到
    服务:jmx:rmi:/// jndi / rmi:// localhost:1099 / jmxrmi |
    org.apache.activemq.broker.jmx.ManagementContext | JMX连接器

    注意:假设 10.10.10.16 是AMQ主机的IP。

    NOTE : Assuming that 10.10.10.16 is the IP of AMQ host.


    1. 尝试与之连接来自具有URL AMQ主机的另一台计算机上的jconsole service:jmx:rmi:/// jndi / rmi://10.10.10.16:1099 / jmxrmi 不带用户/密码。

    如果无法连接,请尝试如下操作:

    if you cannot connect, try like this :


    <managementContext>
      <managementContext createConnector="true"  connectorPort="1099"  connectorHost="10.10.10.16" />
    </managementContext>
    



  • 验证在AMQ日志中,您有

    verify that in AMQ logs you have


    INFO | JMX控制台可以连接到
    服务:jmx:rmi:/// jndi / rmi://10.10.10.16:1099 / jmxrmi |
    org.apache.activemq.broker.jmx.ManagementContext | JMX连接器




    1. 尝试连接,第4步

    1. retry to connect, step 4

    在此步骤通常可以与jconsole连接。

    at this step normally you can connect with jconsole.




    <managementContext>
      <managementContext  createConnector="true"  connectorPort="1099"  connectorHost="10.10.10.16" >
          <property xmlns="http://www.springframework.org/schema/beans" name="environment">
              <map xmlns="http://www.springframework.org/schema/beans">
                  <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.password.file"
                         value="${activemq.conf}/jmx.password"/>
                  <entry xmlns="http://www.springframework.org/schema/beans" key="jmx.remote.x.access.file"
                         value="${activemq.conf}/jmx.access"/>
              </map>
          </property>
      </managementContext>
    </managementContext>
    


    请尝试以下步骤,让我知道您在哪一个失败从jconsole连接并提供错误消息。

    Please try these steps and let me know in which one you fails to connect and provide error message from jconsole.