开发者

ActiveMQ console not available

开发者 https://www.devze.com 2023-03-25 03:44 出处:网络
I installed ActiveMQ 5.5.0 on my Windows machine, and it had a web console (http://localhost:8161/admin) working out of the box.

I installed ActiveMQ 5.5.0 on my Windows machine, and it had a web console (http://localhost:8161/admin) working out of the box.

Then I installed ActiveMQ (same version) on a remote Linux box (IP: AAA.BBB.CCC.DDD), but whenever I point the browser to

http://AAA.BBB.CCC.DDD:8161/admin

I get the "Unable to connect" error in the browser.

The network connection is there, I can connect to AAA.BBB.CCC.DDD via ssh and to another web application running on the same server.

Therefore I think that the cause of the problem is wrong configuration of the embedded Jetty server of ActiveMQ.

How can fix the problem, i. e. enable the access to the web console f开发者_开发百科rom a remote browser?


In your ActiveMQ config file you should see something like:

<import resource="${activemq.base}/conf/jetty.xml"/>

This starts up an embedded Jetty container with the web console.

If you start the broker on the console, you should see the following if everything works

 INFO | ActiveMQ WebConsole initialized.
 INFO | Initializing Spring FrameworkServlet 'dispatcher'
 INFO | ActiveMQ Console at http://0.0.0.0:8161/admin


  1. into /opt/activemq/apache-activemq-5.16.3/conf
  2. open jetty.xml
  3. change
 <property name="host" value="127.0.0.1"/>

to

<property name="host" value="0.0.0.0"/>
  1. restart activemq


I used this approach on a linux server running in VM but can be applied to any instance Check whether 8161 port is opened for external connection. Also check whether another service creating a conflict. If there is a conflict change the jetty port in the {activemqfolder}/conf/jetty.xml. locate the line that contains the 8161 and change it to the desirable port

To enable external connections to the port (in this instance i choose 8169) use

sudo iptables -I INPUT -p tcp --dport 8169 -j ACCEPT

Proceed to start the activemq ie {activemqfolder}/bin/activemq console to see the messages

0

精彩评论

暂无评论...
验证码 换一张
取 消