You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2023/05/03 13:23:30 UTC
[GitHub] [rocketmq] PAYNE1Z created a discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
GitHub user PAYNE1Z created a discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
使用 namesrv 内嵌方式部署了controller 4个节点
两个 broker-a 节点 master+slave
当master down机时,slave无法切换到master, 日志中报错
ERROR ReplicasManager_ScheduledService_2 - Failed to register broker to controller
org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
For more information, please visit the url, https://rocketmq.apache.org/docs/bestPractice/06FAQ
at org.apache.rocketmq.broker.out.BrokerOuterAPI.registerBrokerToController(BrokerOuterAPI.java:1183)
at org.apache.rocketmq.broker.controller.ReplicasManager.registerBrokerToController(ReplicasManager.java:302)
at org.apache.rocketmq.broker.controller.ReplicasManager.lambda$schedulingSyncBrokerMetadata$4(ReplicasManager.java:353)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
GitHub link: https://github.com/apache/rocketmq/discussions/6685
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
[GitHub] [rocketmq] mxsm added a comment to the discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
Posted by GitBox <gi...@apache.org>.
GitHub user mxsm added a comment to the discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
能提供一下Controller相关的日志吗?
GitHub link: https://github.com/apache/rocketmq/discussions/6685#discussioncomment-5792396
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
[GitHub] [rocketmq] PAYNE1Z added a comment to the discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
Posted by GitBox <gi...@apache.org>.
GitHub user PAYNE1Z added a comment to the discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
(1)下线主备Broker
(2)利用cleanBrokerData命令清除Controller中该组Broker元数据
(3)删除主备Broker下的文件~/store/epochFileCheckpoint和epochFileCheckpoint.bak
(4)Broker重新上线(尽量保证旧的主备关系,先主后备上线)
参考 #6354 这个操作恢复了
可能是因为我更改过 epochFileCheckpoint 目录
GitHub link: https://github.com/apache/rocketmq/discussions/6685#discussioncomment-5800705
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org
[GitHub] [rocketmq] mxsm added a comment to the discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
Posted by GitBox <gi...@apache.org>.
GitHub user mxsm added a comment to the discussion: 5.1 版本controller 无法自动切换: org.apache.rocketmq.client.exception.MQBrokerException: CODE: 2012 DESC: The broker has not master, and this new registered broker can't not be elected as master
epochFileCheckpoint 这个目录不能改,如果你改动了需要将之前目录中的数据文件也一并移动过去。
GitHub link: https://github.com/apache/rocketmq/discussions/6685#discussioncomment-5807152
----
This is an automatically sent email for dev@rocketmq.apache.org.
To unsubscribe, please send an email to: dev-unsubscribe@rocketmq.apache.org