You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by 李样兵 <ya...@gmail.com> on 2018/06/07 03:24:57 UTC

主节点磁盘损坏,不可启动,定时消息,消息丢失

 hi,

集群配置为主、从同步,主节点磁盘损坏,不可启动,出现定时消息丢失。

查询了代码发现scheduleMessageService,仅仅在主节点启动,这个问题如何解决?

if (this.scheduleMessageService != null && SLAVE !=
messageStoreConfig.getBrokerRole()) {
    this.scheduleMessageService.start();
}

Re: 主节点磁盘损坏,不可启动,定时消息,消息丢失

Posted by 李样兵 <ya...@gmail.com>.
备机改为只读,确实可以解决这个问题

备机修改后,建议改为只读,否则主从配置同步时,会报SLAVE_NOT_AVAILABLE

这么修改会造成历史消息,无法根据消息ID查询,因为消息ID的组成是IP:PORT LOGID,查询时也是直接反解析IP查询的

是否把从节点数据拷贝到一台新的机器,同时把新的机器IP改为原来的主节点IP,这种方案更好一些?



在 2018年6月10日 下午12:33,Zhanhui Li <li...@gmail.com>写道:

> 将备机修改为主机的角色重启, 就OK了.
>
>
> > 在 2018年6月7日,上午11:26,Zhanhui Li <li...@gmail.com> 写道:
> >
> >
> >
> >> 在 2018年6月7日,上午11:24,李样兵 <ya...@gmail.com> 写道:
> >>
> >> hi,
> >>
> >> 集群配置为主、从同步,主节点磁盘损坏,不可启动,出现定时消息丢失。
> >>
> >> 查询了代码发现scheduleMessageService,仅仅在主节点启动,这个问题如何解决?
> >>
> >> if (this.scheduleMessageService != null && SLAVE !=
> >> messageStoreConfig.getBrokerRole()) {
> >>    this.scheduleMessageService.start();
> >> }
> >
>
>

Re: 主节点磁盘损坏,不可启动,定时消息,消息丢失

Posted by Zhanhui Li <li...@gmail.com>.
将备机修改为主机的角色重启, 就OK了.


> 在 2018年6月7日,上午11:26,Zhanhui Li <li...@gmail.com> 写道:
> 
> 
> 
>> 在 2018年6月7日,上午11:24,李样兵 <ya...@gmail.com> 写道:
>> 
>> hi,
>> 
>> 集群配置为主、从同步,主节点磁盘损坏,不可启动,出现定时消息丢失。
>> 
>> 查询了代码发现scheduleMessageService,仅仅在主节点启动,这个问题如何解决?
>> 
>> if (this.scheduleMessageService != null && SLAVE !=
>> messageStoreConfig.getBrokerRole()) {
>>    this.scheduleMessageService.start();
>> }
>