一、该问题的重现步骤是什么?
最新版物联网平台,启动成功,设备模拟时,出现如下问题:

2.
3.
二、你期待的结果是什么?实际看到的又是什么?
帮助查找原因,解决问题。
三、你正在使用的是什么产品,什么版本?在什么操作系统上?
四、请提供详细的错误堆栈信息,这很重要。
五、若有更多详细信息,请在下面提供。
调用流程和相关注意点可以看这里:https://sns.bladex.cn/q-14847.html
你的提问信息太少,还需要提供类似如下信息:
1. 是不是跑的官方的原版工程,改动了哪些逻辑
2. 跑了哪些服务,用的是单机版还是集群版还是emqx版
3. 调试认证逻辑,可以全局搜索 MqttAuthServiceImpl ,点进去后找到对应的hasAuth的逻辑就可以了 (两个文件分别对应broker和emqx服务的认证类)
1、为了测试规则引擎,昨天刚下载的新版本。
2、本地启动的是server、broker模块。
3、采用密码方式:

4、后台报错信息:
2026-03-05 15:49:04.960 ERROR 2240 --- [ tio-group-5] n.d.i.m.c.s.auth.IMqttServerAuthHandler : Mqtt client node:0:0:0:0:0:0:0:1:64097 authenticate error uniqueId:2025121920_jinan-simulator-1772696944876@000000 clientId:2025121920_jinan-simulator-1772696944876@000000|clienttype=2,timestamp=1772696944876| username:2025121920_jinan&XOhBfIDbIHrQ password:7f67cae823d49ec9ecfe567c006d3aa4
java.lang.RuntimeException: Reading from a byte array threw an IOException (should never happen).
at io.protostuff.IOUtil.mergeFrom(IOUtil.java:54)
at io.protostuff.ProtobufIOUtil.mergeFrom(ProtobufIOUtil.java:103)
at org.springblade.core.redis.serializer.ProtoStuffSerializer.deserialize(ProtoStuffSerializer.java:58)
at org.springframework.data.redis.serializer.DefaultRedisElementReader.read(DefaultRedisElementReader.java:46)
at org.springframework.data.redis.serializer.RedisSerializationContext$SerializationPair.read(RedisSerializationContext.java:277)
at org.springframework.data.redis.cache.RedisCache.deserializeCacheValue(RedisCache.java:361)
at org.springframework.data.redis.cache.RedisCache.get(RedisCache.java:156)
at org.springblade.core.cache.utils.CacheUtil.get(CacheUtil.java:110)
at org.springblade.iot.core.cache.DeviceCache.getDeviceByName(DeviceCache.java:112)
at org.springblade.iot.core.utils.ClientUtil.createDeviceInfo(ClientUtil.java:243)
at org.springblade.iot.core.utils.ClientUtil.getDeviceInfo(ClientUtil.java:209)
at org.springblade.iot.broker.core.service.impl.MqttAuthServiceImpl.hasAuth(MqttAuthServiceImpl.java:96)
at org.springblade.iot.broker.core.auth.MqttAuthHandler.authenticate(MqttAuthHandler.java:61)
at net.dreamlu.iot.mqtt.core.server.auth.IMqttServerAuthHandler.verifyAuthenticate(IMqttServerAuthHandler.java:44)
at net.dreamlu.iot.mqtt.core.server.support.DefaultMqttServerProcessor.processConnect(DefaultMqttServerProcessor.java:110)
at net.dreamlu.iot.mqtt.core.server.MqttServerAioHandler.handler(MqttServerAioHandler.java:95)
at net.dreamlu.iot.mqtt.core.server.http.websocket.MqttWsMsgHandler.onBytes(MqttWsMsgHandler.java:132)
at net.dreamlu.iot.mqtt.core.server.http.core.MqttWebServerAioHandler.handlerWs(MqttWebServerAioHandler.java:355)
at net.dreamlu.iot.mqtt.core.server.http.core.MqttWebServerAioHandler.handler(MqttWebServerAioHandler.java:408)
at org.tio.core.task.HandlerRunnable.handler(HandlerRunnable.java:259)
at org.tio.core.task.DecodeRunnable.handler(DecodeRunnable.java:271)
at org.tio.core.task.DecodeRunnable.decode(DecodeRunnable.java:396)
at org.tio.core.ReadCompletionHandler.completed(ReadCompletionHandler.java:250)
at org.tio.core.ReadCompletionHandler.completed(ReadCompletionHandler.java:210)
at java.base/sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:129)
at java.base/sun.nio.ch.Invoker$2.run(Invoker.java:221)
at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:113)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:842)
Caused by: io.protostuff.ProtobufException: Protocol message contained an invalid tag (zero).
at io.protostuff.ProtobufException.invalidTag(ProtobufException.java:106)
at io.protostuff.ByteArrayInput.readFieldNumber(ByteArrayInput.java:253)
at io.protostuff.runtime.RuntimeSchema.mergeFrom(RuntimeSchema.java:457)
at io.protostuff.runtime.ObjectSchema.readObjectFrom(ObjectSchema.java:694)
at io.protostuff.runtime.ObjectSchema.mergeFrom(ObjectSchema.java:351)
at io.protostuff.ByteArrayInput.mergeObject(ByteArrayInput.java:503)
at io.protostuff.runtime.RuntimeUnsafeFieldFactory$15$1.mergeFrom(RuntimeUnsafeFieldFactory.java:1229)
at io.protostuff.runtime.RuntimeSchema.mergeFrom(RuntimeSchema.java:466)
at io.protostuff.IOUtil.mergeFrom(IOUtil.java:45)
... 29 common frames omitted
2026-03-05 15:49:04.966 ERROR 2240 --- [ tio-group-5] n.d.i.m.c.s.s.DefaultMqttServerProcessor : Connect error - clientId: 2025121920_jinan-simulator-1772696944876@000000|clienttype=2,timestamp=1772696944876| uniqueId:2025121920_jinan-simulator-1772696944876@000000 returnCode:connection refused bad user name or password (拒绝连接:用户名或密码错误) result:true
扫一扫访问 Blade技术社区 移动端