You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by "wwj-radish (via GitHub)" <gi...@apache.org> on 2023/06/08 02:02:30 UTC
[GitHub] [rocketmq] wwj-radish edited a comment on the discussion: controller通知broker变更
GitHub user wwj-radish edited a comment on the discussion: controller通知broker变更
嗯是的,但是broker-a和broker-b都把自己变更成了master ... ,在看板中也是两个broker都是master... 0.0
这是broker-a的变更日志:
> 2023-06-08 09:26:06 INFO ReplicasManager_ExecutorService_2 - Change broker [id:1][address:192.168.105.104:10911] to SYNC_MASTER, newMasterBrokerId:1, newMasterAddress:192.168.105.104:10911, newMasterEpoch:3, syncStateSetEpoch:2
> 2023-06-08 09:26:06 INFO main - Set PopReviveService Status to true
这是broker-b的变更日志:
> 2023-06-08 09:26:03 INFO ReplicasManager_ExecutorService_2 - Change broker [id:1][address:192.168.105.105:10911] to SYNC_MASTER, newMasterBrokerId:1, newMasterAddress:192.168.105.105:10911, newMasterEpoch:3, syncStateSetEpoch:2
> 2023-06-08 09:26:03 INFO main - Set PopReviveService Status to true
以下分别是broker-a和broker-b的配置文件:
> brokerClusterName=MyCluster
brokerName=broker-a
deleteWhen=04
fileReservedTime=48
flushDiskType=ASYNC_FLUSH
brokerRole=SLAVE
brokerId=-1
enableControllerMode=true
controllerAddr=192.168.105.111:9877;192.168.105.112:9877;192.168.105.113:9877
allAckInSyncStateSet=true
listenPort=10911
storePathRootDir=/tmp/rmqstore/node00
storePathCommitLog=/tmp/rmqstore/node00/commitlog
> brokerClusterName=MyCluster
brokerName=broker-b
deleteWhen=04
fileReservedTime=48
flushDiskType=ASYNC_FLUSH
brokerRole=SLAVE
brokerId=-1
enableControllerMode=true
controllerAddr=192.168.105.111:9877;192.168.105.112:9877;192.168.105.113:9877
allAckInSyncStateSet=true
listenPort=10911
storePathRootDir=/tmp/rmqstore/node00
storePathCommitLog=/tmp/rmqstore/node00/commitlog
还有broker对namesrc和controller的连接也是好的,日志如下:
> 2023-06-08 09:26:16 INFO brokerOutApi_thread_3 - Registering current broker to name server completed. TargetHost=192.168.105.103:9876
2023-06-08 09:26:16 INFO brokerOutApi_thread_1 - Registering current broker to name server completed. TargetHost=192.168.105.101:9876
2023-06-08 09:26:16 INFO brokerOutApi_thread_2 - Registering current broker to name server completed. TargetHost=192.168.105.102:9876
2023-06-08 09:26:19 INFO ReplicasManager_ScheduledService_3 - Update controller leader address to 192.168.105.112:9877
2023-06-08 09:26:29 INFO ReplicasManager_ScheduledService_1 - Update controller leader address to 192.168.105.112:9877
2023-06-08 09:26:39 INFO ReplicasManager_ScheduledService_2 - Update controller leader address to 192.168.105.112:9877
controller集群状态也是好的,执行命令后如下:
> sh mqadmin getControllerMetaData -a localhost:9877
#ControllerGroup group1
#ControllerLeaderId n1
#ControllerLeaderAddress 192.168.105.112:9877
#Peer: n0:192.168.105.111:9877
#Peer: n1:192.168.105.112:9877
#Peer: n2:192.168.105.113:9877
GitHub link: https://github.com/apache/rocketmq/discussions/6869#discussioncomment-6117321
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org