rocketmq吧 关注:24贴子:37
  • 1回复贴,共1

急!!!rocketMQ2m-2s双主双从模式,从节点无法启动

只看楼主收藏回复

服务器信息如下:
| 序号** | **IP** | **角色** | **架构模式** |
| ------ | ------------- | ------------------------------------ | ----------------------- |
| 1 | 192.168.83.138 | nameserver、brokerserver | Master1、Slave2 |
| 2 | 192.168.83.139 | nameserver、brokerserver | Master2、Slave1 |
==========================================================
服务器1的主从可以正常启动,服务器2的主可以启动可以正常将信息注册到namesrv,但是当启动从节点时,可以启动服务,但是会提示如下异常,同时rocketmq控制台也同样会提示
2020-02-28 10:47:52 WARN ShutdownHook - unregisterBroker Exception, 192.168.83.138:9876
org.apache.rocketmq.remoting.exception.RemotingConnectException: connect to 192.168.83.138:9876 failed
at org.apache.rocketmq.remoting.netty.NettyRemotingClient.invokeSync(NettyRemotingClient.java:390) ~[rocketmq-remoting-4.6.1.jar:4.6.1]
at org.apache.rocketmq.broker.out.BrokerOuterAPI.unregisterBroker(BrokerOuterAPI.java:248) ~[rocketmq-broker-4.6.1.jar:4.6.1]
at org.apache.rocketmq.broker.out.BrokerOuterAPI.unregisterBrokerAll(BrokerOuterAPI.java:225) ~[rocketmq-broker-4.6.1.jar:4.6.1]
at org.apache.rocketmq.broker.BrokerController.unregisterBrokerAll(BrokerController.java:840) [rocketmq-broker-4.6.1.jar:4.6.1]
at org.apache.rocketmq.broker.BrokerController.shutdown(BrokerController.java:779) [rocketmq-broker-4.6.1.jar:4.6.1]
at org.apache.rocketmq.broker.BrokerStartup$1.run(BrokerStartup.java:239) [rocketmq-broker-4.6.1.jar:4.6.1]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_241]

rocketmq版本:4.4.0
jdk:1.8
从节点配置文件:
#所属集群名字
brokerClusterName=rocketmq-cluster
#broker名字,注意此处不同的配置文件填写的不一样
brokerName=broker-a
#0 表示 Master,>0 表示 Slave
brokerId=1
#nameServer地址,分号分割
namesrvAddr=rocketmq-nameserver1:9876;rocketmq-nameserver2:9876
#在发送消息时,自动创建服务器不存在的topic,默认创建的队列数
defaultTopicQueueNums=4
#是否允许 Broker 自动创建Topic,建议线下开启,线上关闭
autoCreateTopicEnable=true
#是否允许 Broker 自动创建订阅组,建议线下开启,线上关闭
autoCreateSubscriptionGroup=true
#Broker 对外服务的监听端口
listenPort=11011
#删除文件时间点,默认凌晨 4点
deleteWhen=04
#文件保留时间,默认 48 小时
fileReservedTime=120
#commitLog每个文件的大小默认1G
mapedFileSizeCommitLog=1073741824
#ConsumeQueue每个文件默认存30W条,根据业务情况调整
mapedFileSizeConsumeQueue=300000
#destroyMapedFileIntervalForcibly=120000
#redeleteHangedFileInterval=120000
#检测物理文件磁盘空间
diskMaxUsedSpaceRatio=88
#存储路径
storePathRootDir=/usr/local/rocketmq/salvestore
#commitLog 存储路径
storePathCommitLog=/usr/local/rocketmq/salvestore/commitlog
#消费队列存储路径存储路径
storePathConsumeQueue=/usr/local/rocketmq/salvestore/consumequeue
#消息索引存储路径
storePathIndex=/usr/local/rocketmq/salvestore/index
#checkpoint 文件存储路径
storeCheckpoint=/usr/local/rocketmq/salvestore/checkpoint
#abort 文件存储路径
abortFile=/usr/local/rocketmq/salvestore/abort
#限制的消息大小
maxMessageSize=65536
#flushCommitLogLeastPages=4
#flushConsumeQueueLeastPages=2
#flushCommitLogThoroughInterval=10000
#flushConsumeQueueThoroughInterval=60000
#Broker 的角色
#- ASYNC_MASTER 异步复制Master
#- SYNC_MASTER 同步双写Master
#- SLAVE
brokerRole=SLAVE
#刷盘方式
#- ASYNC_FLUSH 异步刷盘
#- SYNC_FLUSH 同步刷盘
flushDiskType=ASYNC_FLUSH
#checkTransactionMessageEnable=false
#发消息线程池数量
#sendMessageThreadPoolNums=128
#拉消息线程池数量
#pullMessageThreadPoolNums=128
我关闭了防火墙,两台服务器也能拼通,telnet 192.168.83.138 9876 ,是正常的,大佬们求教??


回复
1楼2020-02-28 19:18
    朋友解决了么,遇到了同样的问题


    回复
    3楼2020-08-05 13:42