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":{
     }
}

重新启动即可。

你可能感兴趣的:(java,zookeeper,java)