【问题标题】:Unable to access JMX Console on ActiveMQ 5.12.0 VM无法访问 ActiveMQ 5.12.0 VM 上的 JMX 控制台
【发布时间】:2016-02-22 23:24:30
【问题描述】:

我试图让 JMX 控制台在手动安装了 ActiveMQ 5.12.0 的 Vagrant VM 机器上工作。我已经按照指南进行了

还有许多 Stackoverflow 故障排除问题:

但我仍然无法从主机访问控制台。

我已经完成了以下步骤:

  • 在 activemq.xml 文件的 标签中添加了 useJmx="true"
  • 在 activemq.xml 文件中设置以下管理上下文:

    <managementContext createConnector="true" rmiServerPort="1098" connectorPort="1099"/>
    
  • 将 ACTIVEMQ_SUNJMX_START 环境变量设置为

    "\
    -Dcom.sun.management.jmxremote.ssl=false\
    -Dcom.sun.management.jmxremote.password.file=/usr/share/activemq/conf/jmx.password\
    -Dcom.sun.management.jmxremote.access.file=/usr/share/activemq/conf/jmx.access\
    "
    
  • 正在尝试连接

    service:jmx:rmi://192.168.150.117:1098/jndi/rmi://192.168.150.117:1099/jmxrmi
    
  • 使用 admin:activemq 作为用户名:密码(在 jmx.access 和 jmx.password 中指定)

这是activemq.log文件:

    2015-11-20 12:24:39,710 | INFO  | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@190c4838: startup date [Fri Nov 20 12:24:39 GMT 2015]; root of context hierarchy | org.apache.activemq.xbean.XBeanBrokerFactory$1 | main
    2015-11-20 12:24:42,094 | INFO  | PListStore:[/usr/share/activemq/data/localhost/tmp_storage] started | org.apache.activemq.store.kahadb.plist.PListStoreImpl | main
    2015-11-20 12:24:42,191 | INFO  | Using Persistence Adapter: KahaDBPersistenceAdapter[/usr/share/activemq/data/kahadb] | org.apache.activemq.broker.BrokerService | main
    2015-11-20 12:24:42,232 | INFO  | JMX consoles can connect to service:jmx:rmi://localhost:1098/jndi/rmi://localhost:1099/jmxrmi | org.apache.activemq.broker.jmx.ManagementContext | JMX connector
    2015-11-20 12:24:42,464 | INFO  | Apache ActiveMQ 5.12.0 (localhost, ID:activemq.cdl.vm-56262-1448022282329-0:1) is starting | org.apache.activemq.broker.BrokerService | main
    2015-11-20 12:24:42,492 | INFO  | Listening for connections at: tcp://activemq.cdl.vm:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
    2015-11-20 12:24:42,498 | INFO  | Connector openwire started | org.apache.activemq.broker.TransportConnector | main
    2015-11-20 12:24:42,505 | INFO  | Listening for connections at: amqp://activemq.cdl.vm:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
    2015-11-20 12:24:42,510 | INFO  | Connector amqp started | org.apache.activemq.broker.TransportConnector | main
    2015-11-20 12:24:42,525 | INFO  | Listening for connections at: stomp://activemq.cdl.vm:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
    2015-11-20 12:24:42,532 | INFO  | Connector stomp started | org.apache.activemq.broker.TransportConnector | main
    2015-11-20 12:24:42,542 | INFO  | Listening for connections at: mqtt://activemq.cdl.vm:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.TransportServerThreadSupport | main
    2015-11-20 12:24:42,550 | INFO  | Connector mqtt started | org.apache.activemq.broker.TransportConnector | main
    2015-11-20 12:24:42,693 | INFO  | Listening for connections at ws://activemq.cdl.vm:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600 | org.apache.activemq.transport.ws.WSTransportServer | main
    2015-11-20 12:24:42,698 | INFO  | Connector ws started | org.apache.activemq.broker.TransportConnector | main
    2015-11-20 12:24:42,706 | INFO  | Apache ActiveMQ 5.12.0 (localhost, ID:activemq.cdl.vm-56262-1448022282329-0:1) started | org.apache.activemq.broker.BrokerService | main
    2015-11-20 12:24:42,720 | INFO  | For help or more information please see: http://activemq.apache.org | org.apache.activemq.broker.BrokerService | main
    2015-11-20 12:24:42,730 | WARN  | Store limit is 102400 mb (current store usage is 0 mb). The data directory: /usr/share/activemq/data/kahadb only has 10221 mb of usable space - resetting to maximum available disk space: 10221 mb | org.apache.activemq.broker.BrokerService | main
    2015-11-20 12:24:42,737 | WARN  | Temporary Store limit is 51200 mb, whilst the temporary data directory: /usr/share/activemq/data/localhost/tmp_storage only has 10221 mb of usable space - resetting to maximum available 10221 mb. | org.apache.activemq.broker.BrokerService | main
    2015-11-20 12:24:43,444 | INFO  | ActiveMQ WebConsole available at http://0.0.0.0:8161/ | org.apache.activemq.web.WebConsoleStarter | main
    2015-11-20 12:24:43,444 | INFO  | ActiveMQ Jolokia REST API available at http://0.0.0.0:8161/api/jolokia/ | org.apache.activemq.web.WebConsoleStarter | main
    2015-11-20 12:24:43,538 | INFO  | Initializing Spring FrameworkServlet 'dispatcher' | /admin | main
    2015-11-20 12:24:43,950 | INFO  | jolokia-agent: No access restrictor found at classpath:/jolokia-access.xml, access to all MBeans is allowed | /api | main

当我尝试连接时,它只会显示“安全连接失败。不安全地重试?”。然后它尝试并再次失败并显示“连接失败:重试?”

【问题讨论】:

    标签: vagrant activemq virtualbox jmx jconsole


    【解决方案1】:

    我在 ACTIVEMQ_SUNJMX_START 环境变量上设置了以下选项:

    export ACTIVEMQ_SUNJMX_START="\
     -Dcom.sun.management.jmxremote\
     -Dcom.sun.management.jmxremote.ssl=false\
     -Dcom.sun.management.jmxremote.authenticate=false\
     -Dcom.sun.management.jmxremote.local.only=false\
    "
    

    现在它可以工作了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多