从外部地址访问管理Web控制台

时间:2018-10-17 13:28:28

标签: console remote-access activemq-artemis

使用http://localhost:8161/consolehttp://127.0.0.1:8161/console访问管理控制台是可行的,但是使用http://10.0.2.15:8161/console则挂起。

netstat -nlt tcp6 0 0 ::: 8161 ::: *听

bootstrap.xml上有:

<web bind="http://0.0.0.0:8161" path="web">

在jolokia-access.xml上,我尝试了很多连击,但是没有运气:

<restrict>
    <!-- tried with and without
    <cors> 
        <allow-origin>*://10.0.2.15*</allow-origin>
        <allow-origin>*://10.0.2.15:8161</allow-origin>
        <allow-origin>*://*</allow-origin>
        <strict-checking/>
    </cors> 
    -->
</restrict>

我正在xubuntu VM上的virtualbox中运行它。我在这里想念什么?

telnet 10.0.2.15 8161:

Trying 10.0.2.15...
Connected to 10.0.2.15.
Escape character is '^]'.
GET /console
HTTP/1.1 400 HTTP/0.9 not supported
Content-Type: text/html;charset=iso-8859-1
Content-Length: 65
Connection: close

<h1>Bad Message 400</h1><pre>reason: HTTP/0.9 not supported</pre>Connection closed by foreign host.

telnet 10.0.2.15 8161

Trying 10.0.2.15...
Connected to 10.0.2.15.
Escape character is '^]'.
GET /console HTTP/1.0
HANGS

1 个答案:

答案 0 :(得分:0)

发行后

curl -v http://10.0.2.15:8161/console/ -H "Host: localhost:8161"
 Trying 10.0.2.15...
 TCP_NODELAY set
 Connected to 10.0.2.15 (10.0.2.15) port 9999 (#0)
 GET http://10.0.2.15:8161/console/ HTTP/1.1
 Host: localhost:8161

发现是导致此问题的原因是我的本地代理在9999上运行。