0

I know the question has been asked many times here and I have followed many of the conversations but no luck for me. ActiveMQ Browser and ActiveMQ can't be connected.

So I'm asking here again with full information I have locally.

Env information:

  1. JDK 1.8
  2. Windows 10
  3. ActiveMQ 5.15.3
  4. ActiveMQ Browser 2.5.2.8

ActiveMQ Config

    <managementContext>
        <managementContext createConnector="false" />
    </managementContext>

ActiveMQ bat file set ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=%ACTIVEMQ_CONF%/jmx.password -Dcom.sun.management.jmxremote.access.file=%ACTIVEMQ_CONF%/jmx.access

ActiveMQ Browser Connection Config

service:jmx:rmi:///jndi/rmi://E105756:1616/jmxrmi role: admin password: activemq

Exception

Could not start QBrowserV2 Failed to connect to ActiveMQ JMX Server.

Please make sure input value of JMX service URL and/or User, Password are correct.

Input JMX URL : service:jmx:rmi:///jndi/rmi://E105756:1616/jmxrmi

Notes: I have tried with below options already Option 1: Using createConnector = "true" Option 2: Using rmi port 1098

I'm still getting exception when trying to connect from ActiveMQ Browser

Please help

Nghia

Mr Smith
  • 3,318
  • 9
  • 47
  • 85
Nghia Do
  • 2,588
  • 2
  • 17
  • 31

1 Answers1

1

After googling around, finally ActiveMQ and ActiveMQ Browser are happy together.

Here is all my configurations

1. activemq.xml

<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.data}" useJmx="true">

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

2. activemq.bat

set ACTIVEMQ_SUNJMX_START=-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=%ACTIVEMQ_CONF%/jmx.password -Dcom.sun.management.jmxremote.access.file=%ACTIVEMQ_CONF%/jmx.access

3. ActiveMQ 5.15.3 start log

C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin>activemq start Java Runtime: Oracle Corporation 1.8.0_101 C:\Program Files\Java\jdk1.8.0_101\jre Heap sizes: current=1005056k free=994570k max=1005056k JVM args: -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.password.file=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\conf/jmx.password -Dcom.sun.management.jmxremote.access.file=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\conf/jmx.access -Xms1G -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\conf\login.config -Dactivemq.classpath=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\conf;C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin../conf;C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin../conf; -Dactivemq.home=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin.. -Dactivemq.base=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin.. -Dactivemq.conf=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\conf -Dactivemq.data=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\data -Djava.io.tmpdir=C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\data\tmp Extensions classpath:
[C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\lib,C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\lib\camel,C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\lib\optional,C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\lib\web,C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\lib\extra] ACTIVEMQ_HOME: C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin.. ACTIVEMQ_BASE: C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin.. ACTIVEMQ_CONF: C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\conf ACTIVEMQ_DATA: C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\data Loading message broker from: xbean:activemq.xml INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@1554909b: startup date [Fri Mar 02 11:03:24 CST 2018]; root of context hierarchy INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\data\kahadb] INFO | KahaDB is version 6 INFO | JMX consoles can connect to service:jmx:rmi://localhost:1098/jndi/rmi://localhost:1099/jmxrmi INFO | PListStore:[C:\work\soft\apache-activemq-5.15.3-bin\apache-activemq-5.15.3\bin..\data\localhost\tmp_storage] started INFO | Apache ActiveMQ 5.15.3 (localhost, ID:E105756-56074-1520010210044-0:1) is starting INFO | Listening for connections at: tcp://E105756:61616?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector openwire started INFO | Listening for connections at: amqp://E105756:5672?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector amqp started INFO | Listening for connections at: stomp://E105756:61613?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector stomp started INFO | Listening for connections at: mqtt://E105756:1883?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector mqtt started WARN | ServletContext@o.e.j.s.ServletContextHandler@4241e0f4{/,null,STARTING} has uncovered http methods for path: / INFO | Listening for connections at ws://E105756:61614?maximumConnections=1000&wireFormat.maxFrameSize=104857600 INFO | Connector ws started INFO | Apache ActiveMQ 5.15.3 (localhost, ID:E105756-56074-1520010210044-0:1) started INFO | For help or more information please see: http://activemq.apache.org INFO | No Spring WebApplicationInitializer types detected on classpath INFO | ActiveMQ WebConsole available at http://0.0.0.0:8161/ INFO | ActiveMQ Jolokia REST API available at http://0.0.0.0:8161/api/jolokia/ INFO | Initializing Spring FrameworkServlet 'dispatcher' INFO | No Spring WebApplicationInitializer types detected on classpath INFO | jolokia-agent: Using policy access restrictor classpath:/jolokia-access.xml

4. ActiveMQ Broswer version 2.5.2.8

5. Download https://mvnrepository.com/artifact/org.apache.activemq/activemq-web/5.15.3 and copy to ActiveMQ Broswer installation folder.

6. Download http://central.maven.org/maven2/org/apache/activemq/activemq-all/5.15.3/activemq-all-5.15.3.jar and copy to ActiveMQ Broswer installation folder.

7. Change the run_activemq_browser.bat

start "ActiveMQBrowser" javaw -Xms128m -Xmx512m -splash:cube.png -cp .\QBrowserV2_Neo.jar;.\activemq-web-5.15.3.jar;.\activemq-all-5.15.3.jar;.\jide-oss-2.6.2.jar;.\imq.jar;.\jms.jar;.\imqadmin_ja.jar;.\imqadmin.jar;.\imqutil_ja.jar;.\imqutil.jar;.\imqjmx.jar;.\imqjmx_ja.jar com.qbrowser.ActiveMQBrowser

8. See the connection configuration from ActiveMQ Browser JMX URL: service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi JMX Role: admin JMX Password: activemq

Nghia Do
  • 2,588
  • 2
  • 17
  • 31