RocketMQ在Windows下启动broker报load delayOffset.json failed错误问题解决

Windows安装好rocketmq后启动namesrv没问正则,但启动mqbroke后程序 连接不上,检查broker日志发现错误内容如下:
【注:broker日志根据安装RocketMQ时配置不同存放的位置也不同,我的是存放在C:\Users{操作系统用户名}\store\config 下】

2020-09-15 17:25:43 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 0, fastjson-version 1.2.51
	at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:474) ~[fastjson-1.2.51.jar:na]
	at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.parseRest(JavaBeanDeserializer.java:1412) ~[fastjson-1.2.51.jar:na]
	at com.alibaba.fastjson.parser.deserializer.FastjsonASMDeserializer_6_DelayOffsetSerializeWrapper.deserialze(Unknown Source) ~[na:na]
	at com.alibaba.fastjson.parser.deserializer.JavaBeanDeserializer.deserialze(JavaBeanDeserializer.java:269) ~[fastjson-1.2.51.jar:na]
	at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:671) ~[fastjson-1.2.51.jar:na]
	at com.alibaba.fastjson.JSON.parseObject(JSON.java:368) ~[fastjson-1.2.51.jar:na]
	at com.alibaba.fastjson.JSON.parseObject(JSON.java:272) ~[fastjson-1.2.51.jar:na]
	at com.alibaba.fastjson.JSON.parseObject(JSON.java:491) ~[fastjson-1.2.51.jar:na]
	at org.apache.rocketmq.remoting.protocol.RemotingSerializable.fromJson(RemotingSerializable.java:43) ~[rocketmq-remoting-4.4.0.jar:4.4.0]
	at org.apache.rocketmq.store.schedule.ScheduleMessageService.decode(ScheduleMessageService.java:160) [rocketmq-store-4.4.0.jar:4.4.0]
	at org.apache.rocketmq.common.ConfigManager.load(ConfigManager.java:38) ~[rocketmq-common-4.4.0.jar:4.4.0]
	at org.apache.rocketmq.store.schedule.ScheduleMessageService.load(ScheduleMessageService.java:145) [rocketmq-store-4.4.0.jar:4.4.0]
	at org.apache.rocketmq.store.DefaultMessageStore.load(DefaultMessageStore.java:176) [rocketmq-store-4.4.0.jar:4.4.0]
	at org.apache.rocketmq.broker.BrokerController.initialize(BrokerController.java:248) [rocketmq-broker-4.4.0.jar:4.4.0]
	at org.apache.rocketmq.broker.BrokerStartup.createBrokerController(BrokerStartup.java:218) [rocketmq-broker-4.4.0.jar:4.4.0]
	at org.apache.rocketmq.broker.BrokerStartup.main(BrokerStartup.java:58) [rocketmq-broker-4.4.0.jar:4.4.0]

经发现C:\Users[操作系统用户名]\store\config下的delayOffset.json文件内容为空(NUL)。
将其修改为:

{
	"offsetTable":{}
}

重新启动即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值