不能访问Artemis控制台

时间:2019-04-25 12:20:53

标签: activemq-artemis jolokia

我刚刚在新服务器上安装了一个新的artemis,能够正常运行该服务,但无法从外部访问。

我也遵循了这个似乎与我有类似问题的问题,但是 似乎无法正常工作。

Artemis-2.6.3 console: Service Unavailable

我当前的jolokia访问:

<restrict>
    <remote>
      <host>localhost</host>
      <host>10.85.102.148</host><!--This is my computer ip-->
    </remote>   
    <!--
    <cors>
        <allow-origin>*://localhost*</allow-origin>
        <strict-checking/>
    </cors>
    -->
</restrict>

当前日志记录

    2019-04-25 20:16:07,013 INFO  [org.apache.activemq.artemis.integration.bootstrap] AMQ101000: Starting ActiveMQ Artemis Server
2019-04-25 20:16:07,046 INFO  [org.apache.activemq.artemis.core.server] AMQ221000: live Message Broker is starting with configuration Broker Configuration (clustered=false,journalDirectory=data/journal,bindingsDirectory=data/bindings,largeMessagesDirectory=data/large-messages,pagingDirectory=data/paging)
2019-04-25 20:16:07,080 INFO  [org.apache.activemq.artemis.core.server] AMQ221012: Using AIO Journal
2019-04-25 20:16:07,133 INFO  [org.apache.activemq.artemis.core.server] AMQ221057: Global Max Size is being adjusted to 1/2 of the JVM max size (-Xmx). being defined as 1,073,741,824
2019-04-25 20:16:07,162 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-server]. Adding protocol support for: CORE
2019-04-25 20:16:07,163 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-amqp-protocol]. Adding protocol support for: AMQP
2019-04-25 20:16:07,164 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-hornetq-protocol]. Adding protocol support for: HORNETQ
2019-04-25 20:16:07,164 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-mqtt-protocol]. Adding protocol support for: MQTT
2019-04-25 20:16:07,165 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-openwire-protocol]. Adding protocol support for: OPENWIRE
2019-04-25 20:16:07,166 INFO  [org.apache.activemq.artemis.core.server] AMQ221043: Protocol module found: [artemis-stomp-protocol]. Adding protocol support for: STOMP
2019-04-25 20:16:07,222 INFO  [org.apache.activemq.artemis.core.server] AMQ221034: Waiting indefinitely to obtain live lock
2019-04-25 20:16:07,223 INFO  [org.apache.activemq.artemis.core.server] AMQ221035: Live Server Obtained live lock
2019-04-25 20:16:08,143 INFO  [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address DLQ supporting [ANYCAST]
2019-04-25 20:16:08,144 INFO  [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue DLQ on address DLQ
2019-04-25 20:16:08,144 INFO  [org.apache.activemq.artemis.core.server] AMQ221080: Deploying address ExpiryQueue supporting [ANYCAST]
2019-04-25 20:16:08,144 INFO  [org.apache.activemq.artemis.core.server] AMQ221003: Deploying ANYCAST queue ExpiryQueue on address ExpiryQueue
2019-04-25 20:16:08,513 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61619 for protocols [CORE,MQTT,AMQP,STOMP,HORNETQ,OPENWIRE]
2019-04-25 20:16:08,521 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5446 for protocols [HORNETQ,STOMP]
2019-04-25 20:16:08,536 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:5673 for protocols [AMQP]
2019-04-25 20:16:08,540 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:1884 for protocols [MQTT]
2019-04-25 20:16:08,545 INFO  [org.apache.activemq.artemis.core.server] AMQ221020: Started EPOLL Acceptor at 0.0.0.0:61614 for protocols [STOMP]
2019-04-25 20:16:08,547 INFO  [org.apache.activemq.artemis.core.server] AMQ221007: Server is now live
2019-04-25 20:16:08,548 INFO  [org.apache.activemq.artemis.core.server] AMQ221001: Apache ActiveMQ Artemis Message Broker version 2.6.4 [0.0.0.0, nodeID=c4f07cfd-6745-11e9-bfbc-005056b0ef9d]
2019-04-25 20:16:09,647 INFO  [org.apache.activemq.hawtio.branding.PluginContextListener] Initialized activemq-branding plugin
2019-04-25 20:16:09,749 INFO  [org.apache.activemq.hawtio.plugin.PluginContextListener] Initialized artemis-plugin plugin
2019-04-25 20:16:10,199 INFO  [io.hawt.HawtioContextListener] Initialising hawtio services
2019-04-25 20:16:10,269 INFO  [io.hawt.system.ConfigManager] Configuration will be discovered via system properties
2019-04-25 20:16:10,273 INFO  [io.hawt.jmx.JmxTreeWatcher] Welcome to hawtio 1.5.5 : http://hawt.io/ : Don't cha wish your console was hawt like me? ;-)
2019-04-25 20:16:10,298 INFO  [io.hawt.jmx.UploadManager] Using file upload directory: /opt/CMS/dev/artemisCMSDEV2.6.4/tmp/uploads
2019-04-25 20:16:10,318 INFO  [io.hawt.web.AuthenticationFilter] Starting hawtio authentication filter, JAAS realm: "activemq" authorized role(s): "amq" role principal classes: "org.apache.activemq.artemis.spi.core.security.jaas.RolePrincipal"
2019-04-25 20:16:10,362 INFO  [io.hawt.web.JolokiaConfiguredAgentServlet] Jolokia overridden property: [key=policyLocation, value=file:/opt/CMS/dev/artemisCMSDEV2.6.4/etc/jolokia-access.xml]
2019-04-25 20:16:10,403 INFO  [io.hawt.web.RBACMBeanInvoker] Using MBean [hawtio:type=security,area=jmx,rank=0,name=HawtioDummyJMXSecurity] for role based access control
2019-04-25 20:16:10,581 INFO  [io.hawt.system.ProxyWhitelist] Initial proxy whitelist: [localhost, 127.0.0.1, 10.92.202.52, mask.myserver.com, 192.168.46.52, mask-p1.myserver.com]
2019-04-25 20:16:10,882 INFO  [org.apache.activemq.artemis] AMQ241001: HTTP Server started at http://localhost:8162
2019-04-25 20:16:10,883 INFO  [org.apache.activemq.artemis] AMQ241002: Artemis Jolokia REST API available at http://localhost:8162/console/jolokia
2019-04-25 20:16:10,883 INFO  [org.apache.activemq.artemis] AMQ241004: Artemis Console available at http://localhost:8162/console

2 个答案:

答案 0 :(得分:1)

您只需要在下面修改这两个文件:

$ [broker_artemis_path] /etc/bootstrap.xml

<web bind="http://0.0.0.0:8161" path="web">
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
</web>

和$ [broker_artemis_path] /etc/jolokia-access.xml

<cors>
            <!-- Allow cross origin access from localhost ... -->
            <allow-origin>*://*</allow-origin>
            <!-- Options from this point on are auto-generated by Create.java from the Artemis CLI -->
            <!-- Check for the proper origin on the server side, too -->
            <strict-checking/>
</cors>

有关更多信息,您可以检查以下链接: https://medium.com/@hasnat.saeed/setup-activemq-artemis-on-ubuntu-18-04-76bb4975308b

答案 1 :(得分:0)

根据日志,控制台绑定到http://localhost:8162,因此无法从外部localhost访问。请检查bind中的bootstrap.xml条目。 另请注意,您在localhost的{​​{1}}部分的cors中有一个限制,也应该调整。