docker 启动 rocketmq:4.4.0

本文介绍如何在Docker中部署RocketMQ 4.4.0,重点在于修复RemotingConnectException,包括修改broker.conf中brokerIP1为Linux VM的公网IP,并详细记录了安装步骤和配置过程,特别强调了启动顺序和外部连接的管控台设置。
摘要由CSDN通过智能技术生成

org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to <172.17.0.3:10909> faile

brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
brokerIP1 = 192.168.119.128 

添加 brokerIP1 = linux的ip地址
ip地址是自己 VM 下Linux的ip地址

安装步骤

docker pull rocketmqinc/rocketmq:4.4.0
mkdir -p /mnt/docker/RocketMQ/conf
vi /mnt/docker/RocketMQ/conf/broker.conf
--------------------------------------------------
brokerClusterName = DefaultCluster
brokerName = broker-a
brokerId = 0
deleteWhen = 04
fileReservedTime = 48
brokerRole = ASYNC_MASTER
flushDiskType = ASYNC_FLUSH
brokerIP1 = {本地公网 IP}
-------------------------------------------------
docker run -d -p 9876:9876 -v /mnt/docker/RocketMQ/data/namesrv/logs:/root/logs -v /mnt/docker/RocketMQ/data/namesrv/store:/root/store --name rmqnamesrv -e "MAX_POSSIBLE_HEAP=100000000" rocketmqinc/rocketmq:4.4.0 sh mqnamesrv
docker run -d -p 10911:10911 -p 10909:10909 -v /mnt/docker/RocketMQ/data/broker/logs:/root/logs -v /mnt/docker/RocketMQ/data/broker/store:/root/store -v /mnt/docker/RocketMQ/conf/broker.conf:/opt/rocketmq-4.4.0/conf/broker.conf --name rmqbroker --link rmqnamesrv:namesrv -e "NAMESRV_ADDR=namesrv:9876" -e "MAX_POSSIBLE_HEAP=200000000" rocketmqinc/rocketmq:4.4.0 sh mqbroker -c /opt/rocketmq-4.4.0/conf/broker.conf

启动是先启动 namesrv 在启动 bocker

管控台是在外部连接的

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值