无法使用主机名和公共 IP 访问 ActiveMQ-Artemis 主页

如何解决无法使用主机名和公共 IP 访问 ActiveMQ-Artemis 主页

我有两个具有类似配置的 ActiveMQ-Artemis 实例。它们都在 Azure 上的 Ubuntu VM 上运行。我为两者都设置了主机名——假设它们是 prod01.sys 和 prod02.sys。两者都解析为公共 IP。我可以 ping prod01.sys 和 prod02.sys 来确认。但是,只有 prod01.sys:8443 解析到 Artemis 主页(或实际控制台的 prod01.sys:8443/console)。我可以使用私有 IP 访问两者。

我不确定如何进一步诊断。这是我的 bootstrap.xml 文件:

prod01.sys

<broker xmlns="http://activemq.org/schema">

   <jaas-security domain="activemq"/>

   <server configuration="file:/var/lib/broker-HA/etc//broker.xml"/>

   <web bind="https://0.0.0.0:8443"
           path="web"
           keyStorePath="/{path}/keystore.ks"
           keyStorePassword="{secret}">
       <app url="jolokia" war="/opt/jolokia/jolokia-war-1.3.5.war"/>
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
   </web>


</broker>

prod02.sys

<broker xmlns="http://activemq.org/schema">

   <jaas-security domain="activemq"/>

   <server configuration="file:/var/lib/broker-HA/etc//broker.xml"/>

   <web bind="https://0.0.0.0:8443"
           path="web"
           keyStorePath="/{path}/keystore.ks"
           keyStorePassword="{secret}">
       <app url="jolokia" war="/opt/jolokia/jolokia-war-1.3.5.war"/>
       <app url="activemq-branding" war="activemq-branding.war"/>
       <app url="artemis-plugin" war="artemis-plugin.war"/>
       <app url="console" war="console.war"/>
   </web>


</broker>

jolokia-access.xml 是相同的:

<restrict>
    <cors>
        <allow-origin>*://*</allow-origin>
        <strict-checking/>
    </cors>
</restrict>
<restrict>
    <cors>
        <allow-origin>*://*</allow-origin>
        <strict-checking/>
    </cors>
</restrict>

这里是端口和 ifconfig

prod01.sys

$ sudo lsof -i -P -n | grep LISTEN
systemd-r  1072 systemd-resolve   13u  IPv4    30148      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd       1667            root    3u  IPv4    34444      0t0  TCP *:22 (LISTEN)
sshd       1667            root    4u  IPv6    34446      0t0  TCP *:22 (LISTEN)
omsagent  30804        omsagent   16u  IPv4 91358169      0t0  TCP *:25324 (LISTEN)
npmd_agen 30854        omsagent    4u  IPv6 91361297      0t0  TCP *:8084 (LISTEN)
java      88458        activemq   17u  IPv6 76117836      0t0  TCP *:35259 (LISTEN)
java      88458        activemq   18u  IPv6 76117837      0t0  TCP *:9876 (LISTEN)
java      88458        activemq   19u  IPv6 76117838      0t0  TCP *:33835 (LISTEN)
java      88458        activemq   75u  IPv6 76115615      0t0  TCP *:1099 (LISTEN)
java      88458        activemq   76u  IPv6 76115616      0t0  TCP 10.40.50.17:46775 (LISTEN)
java      88458        activemq  156u  IPv6 76118634      0t0  TCP *:61616 (LISTEN)
java      88458        activemq  193u  IPv6 76118635      0t0  TCP *:5500 (LISTEN)
java      88458        activemq  223u  IPv6 76119321      0t0  TCP *:8443 (LISTEN)
rpcbind   95821            root    8u  IPv4 53547139      0t0  TCP *:111 (LISTEN)
rpcbind   95821            root   11u  IPv6 53547142      0t0  TCP *:111 (LISTEN)
$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet {private IP}  netmask 255.255.255.0  broadcast {IP}.255
        inet6 fe80::20d:3aff:fe04:1301  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:3a:04:13:01  txqueuelen 1000  (Ethernet)
        RX packets 188638370  bytes 46501451447 (46.5 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 194295204  bytes 46824612750 (46.8 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 8125028  bytes 1891996483 (1.8 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8125028  bytes 1891996483 (1.8 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

prod02.sys

$ sudo lsof -i -P -n | grep LISTEN
rpcbind     735            root    8u  IPv4    16921      0t0  TCP *:111 (LISTEN)
rpcbind     735            root   11u  IPv6    16924      0t0  TCP *:111 (LISTEN)
systemd-r   998 systemd-resolve   13u  IPv4    20488      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd       1337            root    3u  IPv4    22325      0t0  TCP *:22 (LISTEN)
sshd       1337            root    4u  IPv6    22327      0t0  TCP *:22 (LISTEN)
java      10408        activemq   17u  IPv6  7185953      0t0  TCP *:45983 (LISTEN)
java      10408        activemq   18u  IPv6  7185954      0t0  TCP *:9876 (LISTEN)
java      10408        activemq   19u  IPv6  7185955      0t0  TCP *:42375 (LISTEN)
java      10408        activemq   75u  IPv6  7185956      0t0  TCP *:1099 (LISTEN)
java      10408        activemq   76u  IPv6  7177821      0t0  TCP 10.40.50.12:43339 (LISTEN)
java      10408        activemq  149u  IPv6  7184849      0t0  TCP *:8443 (LISTEN)
omsagent- 24987        omsagent   16u  IPv4 15027544      0t0  TCP *:25324 (LISTEN)
npmd_agen 25037        omsagent    4u  IPv6 15027058      0t0  TCP *:8084 (LISTEN)
$ ifconfig
eth0: flags=4163<UP,MULTICAST>  mtu 1500
        inet {private IP}  netmask 255.255.255.0  broadcast {private}.255
        inet6 fe80::20d:3aff:fee5:2a38  prefixlen 64  scopeid 0x20<link>
        ether 00:0d:3a:e5:2a:38  txqueuelen 1000  (Ethernet)
        RX packets 33770791  bytes 11475793216 (11.4 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 34878913  bytes 8169417229 (8.1 GB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 2580078  bytes 375020191 (375.0 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2580078  bytes 375020191 (375.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

我不确定从这里开始调查什么。对我来说特别困惑的是prod01.sys带出首页,解析到公网IP,但是直接使用公网IP却上不去首页。我接下来应该看哪里?我不确定问题是出在 Azure、Ubuntu 还是 Artemis 上。

以下是有效和无效的总结:

对于 prod01,这些工作:

https://prod01.sys:8443 
https://{Azure machine name}:8443
https://{private IP}:8443

这个失败(虽然可以ping通)

https://{public IP}:8443

对于 prod02,这些工作:

https://{Azure machine name}:8443 
https://{private IP}:8443

但是这些都失败了(虽然它们可以ping通)

https://prod02.sys:8443 
https://{public IP}:8443

解决方法

ActiveMQ Artemis 配置对我来说看起来不错。我会检查 VM 操作系统防火墙规则和 Azure 网络安全组。

在尝试连接到 ActiveMQ Artemis 之前,您可以尝试连接到 sshd 以测试您的 Azure/OS 网络配置。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


使用本地python环境可以成功执行 import pandas as pd import matplotlib.pyplot as plt # 设置字体 plt.rcParams[&#39;font.sans-serif&#39;] = [&#39;SimHei&#39;] # 能正确显示负号 p
错误1:Request method ‘DELETE‘ not supported 错误还原:controller层有一个接口,访问该接口时报错:Request method ‘DELETE‘ not supported 错误原因:没有接收到前端传入的参数,修改为如下 参考 错误2:cannot r
错误1:启动docker镜像时报错:Error response from daemon: driver failed programming external connectivity on endpoint quirky_allen 解决方法:重启docker -&gt; systemctl r
错误1:private field ‘xxx‘ is never assigned 按Altʾnter快捷键,选择第2项 参考:https://blog.csdn.net/shi_hong_fei_hei/article/details/88814070 错误2:启动时报错,不能找到主启动类 #
报错如下,通过源不能下载,最后警告pip需升级版本 Requirement already satisfied: pip in c:\users\ychen\appdata\local\programs\python\python310\lib\site-packages (22.0.4) Coll
错误1:maven打包报错 错误还原:使用maven打包项目时报错如下 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources)
错误1:服务调用时报错 服务消费者模块assess通过openFeign调用服务提供者模块hires 如下为服务提供者模块hires的控制层接口 @RestController @RequestMapping(&quot;/hires&quot;) public class FeignControl
错误1:运行项目后报如下错误 解决方案 报错2:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project sb 解决方案:在pom.
参考 错误原因 过滤器或拦截器在生效时,redisTemplate还没有注入 解决方案:在注入容器时就生效 @Component //项目运行时就注入Spring容器 public class RedisBean { @Resource private RedisTemplate&lt;String
使用vite构建项目报错 C:\Users\ychen\work&gt;npm init @vitejs/app @vitejs/create-app is deprecated, use npm init vite instead C:\Users\ychen\AppData\Local\npm-
参考1 参考2 解决方案 # 点击安装源 协议选择 http:// 路径填写 mirrors.aliyun.com/centos/8.3.2011/BaseOS/x86_64/os URL类型 软件库URL 其他路径 # 版本 7 mirrors.aliyun.com/centos/7/os/x86
报错1 [root@slave1 data_mocker]# kafka-console-consumer.sh --bootstrap-server slave1:9092 --topic topic_db [2023-12-19 18:31:12,770] WARN [Consumer clie
错误1 # 重写数据 hive (edu)&gt; insert overwrite table dwd_trade_cart_add_inc &gt; select data.id, &gt; data.user_id, &gt; data.course_id, &gt; date_format(
错误1 hive (edu)&gt; insert into huanhuan values(1,&#39;haoge&#39;); Query ID = root_20240110071417_fe1517ad-3607-41f4-bdcf-d00b98ac443e Total jobs = 1
报错1:执行到如下就不执行了,没有显示Successfully registered new MBean. [root@slave1 bin]# /usr/local/software/flume-1.9.0/bin/flume-ng agent -n a1 -c /usr/local/softwa
虚拟及没有启动任何服务器查看jps会显示jps,如果没有显示任何东西 [root@slave2 ~]# jps 9647 Jps 解决方案 # 进入/tmp查看 [root@slave1 dfs]# cd /tmp [root@slave1 tmp]# ll 总用量 48 drwxr-xr-x. 2
报错1 hive&gt; show databases; OK Failed with exception java.io.IOException:java.lang.RuntimeException: Error in configuring object Time taken: 0.474 se
报错1 [root@localhost ~]# vim -bash: vim: 未找到命令 安装vim yum -y install vim* # 查看是否安装成功 [root@hadoop01 hadoop]# rpm -qa |grep vim vim-X11-7.4.629-8.el7_9.x
修改hadoop配置 vi /usr/local/software/hadoop-2.9.2/etc/hadoop/yarn-site.xml # 添加如下 &lt;configuration&gt; &lt;property&gt; &lt;name&gt;yarn.nodemanager.res