放在Windows 下的 RocketMQ Broker突然启动不了,直接闪退;

解决:

1. 找到 日志目录

在根目录 conf 文件夹下的 logback_broker.xml 文件中,第 22 行即是日志所在目录,如下图  


运行中 输入英文点 . 回车即可进入相应目录


2. 分析日志信息

在文件 broker_default.log 中,并没有找到异常信息,看了下 broker.log ,异常信息如下:

2021-09-11 08:14:10 ERROR main - load C:\Users\Administrator\store\config\delayOffset.json failed, and try to load backup file

com.alibaba.fastjson.JSONException: syntax error, expect {, actual EOF, pos 52, fastjson-version 1.2.76
at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:510) ~[fastjson-1.2.76.jar:na]
at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.parseRest(JavaBeanDeserializer.java:1628) ~[fastjson-1.2.76.jar:na]
at com.alibaba.fastjson.parser.deserializer.FastjsonASMDeserializer_7_DelayOffsetSerializeWrapper.deserialze(Unknown Source) ~[na:na]
at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:291) ~[fastjson-1.2.76.jar:na]
at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:708) ~[fastjson-1.2.76.jar:na]
at com.alibaba.fastjson.JSON.parseObject(JSON.java:394) ~[fastjson-1.2.76.jar:na]
at com.alibaba.fastjson.JSON.parseObject(JSON.java:298) ~[fastjson-1.2.76.jar:na]
at com.alibaba.fastjson.JSON.parseObject(JSON.java:588) ~[fastjson-1.2.76.jar:na]
at org.apache.rocketmq.remoting.protocol.RemotingSerializable.fromJson(RemotingSerializable.java:43) ~[rocketmq-remoting-4.9.0.jar:4.9.0]
at org.apache.rocketmq.store.schedule.ScheduleMessageService.decode(ScheduleMessageService.java:180) [rocketmq-store-4.9.0.jar:4.9.0]
at org.apache.rocketmq.common.ConfigManager.load(ConfigManager.java:38) ~[rocketmq-common-4.9.0.jar:4.9.0]
at org.apache.rocketmq.store.schedule.ScheduleMessageService.load(ScheduleMessageService.java:165) [rocketmq-store-4.9.0.jar:4.9.0]
at org.apache.rocketmq.store.DefaultMessageStore.load(DefaultMessageStore.java:189) [rocketmq-store-4.9.0.jar:4.9.0]
at org.apache.rocketmq.broker.BrokerController.initialize(BrokerController.java:261) [rocketmq-broker-4.9.0.jar:4.9.0]
at org.apache.rocketmq.broker.BrokerStartup.createBrokerController(BrokerStartup.java:222) [rocketmq-broker-4.9.0.jar:4.9.0]
at org.apache.rocketmq.broker.BrokerStartup.main(BrokerStartup.java:58) [rocketmq-broker-4.9.0.jar:4.9.0]


3. 修改错误问题

直接地址栏中,输入 C:\Users\Administrator\store\config\delayOffset.json 文件地址,如下图:

回车打开,可能刚打开需要选择编码,选择 UTF-8 无签名的即可,此时文件应该是空的,复制下面内容粘贴后保存即可:


{
	"offsetTable":{}
}






点赞(0) 打赏

Comment list 共有 0 条评论

暂无评论

微信小程序

微信扫一扫体验

立即
投稿

微信公众账号

微信扫一扫加关注

发表
评论
返回
顶部