Closed abrasat closed 4 years ago
Forgot to tell that in the case above the telemetry data of the device are refreshed only once.
If making the device public, the telemetry data are refreshed correctly, but also cyclically set to 0 with the tb gateway start-time as timestamp (?!). The tb gateway log in this case:
2018-07-26 12:05:39,644 [pool-3-thread-1] DEBUG o.t.g.service.MqttMessageSender - Sending message [{deviceId='HGC', payload={"HGC":[{"ts":1532599715223,"values":{"Fr1":0.0,"Fr2":0.0,"Fr3":0.0,"Gap1":20.5,"Gap2":27.0,"Gap3":17.9,"Speed":0.0,"HeadLength":13.21,"TailLength":6.2}}]}, timestamp=0, topic='v1/gateway/telemetry'id=95b62e69-74a6-4c0a-8e43-2079e31c28ec, messageId=6373}]
2018-07-26 12:05:39,644 [pool-3-thread-1] INFO o.t.g.service.MqttMessageSender - Outgoing queue is not empty. [1] messages are still in progress
2018-07-26 12:05:39,644 [pool-3-thread-1] DEBUG o.t.g.service.MqttMessageSender - Waiting until all messages are sent before going to the next bucket
2018-07-26 12:05:39,644 [pool-4-thread-1] DEBUG o.t.g.s.gateway.MqttGatewayService - [6373][HGC] Device telemetry published to ThingsBoard!
2018-07-26 12:05:39,893 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] TRACE o.t.g.e.m.c.c.m.MqttJsonConverter - Parsing json message: {"ts":1532599716225,"values":{"Fr1": 0.00,"Fr2": 0.00,"Fr3": 0.00,"Srg1": 20.50,"Srg2": 27.00,"Srg3": 17.90,"Spd": 0.00,"HeadLength": 13.21,"TailLength": 6.20}}
2018-07-26 12:05:39,893 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] TRACE o.t.g.s.gateway.MqttGatewayService - [HGC][6374] Updating device telemetry: [BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr1'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr2'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr3'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=20.5} BasicKvEntry{key='Gap1'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=27.0} BasicKvEntry{key='Gap2'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=17.9} BasicKvEntry{key='Gap3'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Speed'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=13.21} BasicKvEntry{key='HeadLength'}}, BasicTsKvEntry{ts=1532599716225, kv=DoubleDataEntry{value=6.2} BasicKvEntry{key='TailLength'}}]
2018-07-26 12:05:39,893 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] DEBUG o.t.g.e.m.client.MqttBrokerMonitor - Re-scheduling keep alive timer for device HGC with timeout = 60000
2018-07-26 12:05:40,659 [pool-3-thread-1] DEBUG o.t.g.service.MqttMessageSender - Sending message [{deviceId='HGC', payload={"HGC":[{"ts":1532599716225,"values":{"Fr1":0.0,"Fr2":0.0,"Fr3":0.0,"Gap1":20.5,"Gap2":27.0,"Gap3":17.9,"Speed":0.0,"HeadLength":13.21,"TailLength":6.2}}]}, timestamp=0, topic='v1/gateway/telemetry'id=a0087686-f0dd-4dc6-9898-b90596d637c5, messageId=6374}]
2018-07-26 12:05:40,659 [pool-3-thread-1] INFO o.t.g.service.MqttMessageSender - Outgoing queue is not empty. [1] messages are still in progress
2018-07-26 12:05:40,659 [pool-3-thread-1] DEBUG o.t.g.service.MqttMessageSender - Waiting until all messages are sent before going to the next bucket
2018-07-26 12:05:40,659 [pool-4-thread-1] DEBUG o.t.g.s.gateway.MqttGatewayService - [6374][HGC] Device telemetry published to ThingsBoard!
2018-07-26 12:05:40,909 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] TRACE o.t.g.e.m.c.c.m.MqttJsonConverter - Parsing json message: {"ts":1532599717226,"values":{"Fr1": 0.00,"Fr2": 0.00,"Fr3": 0.00,"Srg1": 20.50,"Srg2": 27.00,"Srg3": 17.90,"Spd": 0.00,"HeadLength": 13.21,"TailLength": 6.20}}
2018-07-26 12:05:40,909 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] TRACE o.t.g.s.gateway.MqttGatewayService - [HGC][6375] Updating device telemetry: [BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr1'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr2'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr3'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=20.5} BasicKvEntry{key='Gap1'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=27.0} BasicKvEntry{key='Gap2'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=17.9} BasicKvEntry{key='Gap3'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Speed'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=13.21} BasicKvEntry{key='HeadLength'}}, BasicTsKvEntry{ts=1532599717226, kv=DoubleDataEntry{value=6.2} BasicKvEntry{key='TailLength'}}]
2018-07-26 12:05:40,909 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] DEBUG o.t.g.e.m.client.MqttBrokerMonitor - Re-scheduling keep alive timer for device HGC with timeout = 60000
2018-07-26 12:05:40,956 [nioEventLoopGroup-2-19] WARN i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.IllegalStateException: complete already: DefaultPromise@13a561b(failure: java.util.concurrent.CancellationException)
at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:97)
at nl.jk5.mqtt.MqttChannelHandler.handlePuback(MqttChannelHandler.java:215)
at nl.jk5.mqtt.MqttChannelHandler.channelRead0(MqttChannelHandler.java:37)
at nl.jk5.mqtt.MqttChannelHandler.channelRead0(MqttChannelHandler.java:11)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at nl.jk5.mqtt.MqttPingHandler.channelRead(MqttPingHandler.java:39)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:146)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
2018-07-26 12:05:41,659 [pool-3-thread-1] DEBUG o.t.g.service.MqttMessageSender - Sending message [{deviceId='HGC', payload={"HGC":[{"ts":1532599717226,"values":{"Fr1":0.0,"Fr2":0.0,"Fr3":0.0,"Gap1":20.5,"Gap2":27.0,"Gap3":17.9,"Speed":0.0,"HeadLength":13.21,"TailLength":6.2}}]}, timestamp=0, topic='v1/gateway/telemetry'id=e32cb897-38b7-4a9f-a506-e9f219f47df0, messageId=6375}]
2018-07-26 12:05:41,659 [pool-3-thread-1] INFO o.t.g.service.MqttMessageSender - Outgoing queue is not empty. [1] messages are still in progress
2018-07-26 12:05:41,659 [pool-3-thread-1] DEBUG o.t.g.service.MqttMessageSender - Waiting until all messages are sent before going to the next bucket
2018-07-26 12:05:41,659 [pool-4-thread-1] DEBUG o.t.g.s.gateway.MqttGatewayService - [6375][HGC] Device telemetry published to ThingsBoard!
2018-07-26 12:05:41,909 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] TRACE o.t.g.e.m.c.c.m.MqttJsonConverter - Parsing json message: {"ts":1532599718227,"values":{"Fr1": 0.00,"Fr2": 0.00,"Fr3": 0.00,"Srg1": 20.50,"Srg2": 27.00,"Srg3": 17.90,"Spd": 0.00,"HeadLength": 13.21,"TailLength": 6.20}}
2018-07-26 12:05:41,909 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] TRACE o.t.g.s.gateway.MqttGatewayService - [HGC][6376] Updating device telemetry: [BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr1'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr2'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Fr3'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=20.5} BasicKvEntry{key='Gap1'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=27.0} BasicKvEntry{key='Gap2'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=17.9} BasicKvEntry{key='Gap3'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=0.0} BasicKvEntry{key='Speed'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=13.21} BasicKvEntry{key='HeadLength'}}, BasicTsKvEntry{ts=1532599718227, kv=DoubleDataEntry{value=6.2} BasicKvEntry{key='TailLength'}}]
2018-07-26 12:05:41,909 [MQTT Call: 4def0eef-be0f-46f2-8a97-c9bfae83610d] DEBUG o.t.g.e.m.client.MqttBrokerMonitor - Re-scheduling keep alive timer for device HGC with timeout = 60000
2018-07-26 12:05:41,956 [nioEventLoopGroup-2-19] WARN i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.IllegalStateException: complete already: DefaultPromise@184c4e0(failure: java.util.concurrent.CancellationException)
at io.netty.util.concurrent.DefaultPromise.setSuccess(DefaultPromise.java:97)
at nl.jk5.mqtt.MqttChannelHandler.handlePuback(MqttChannelHandler.java:215)
at nl.jk5.mqtt.MqttChannelHandler.channelRead0(MqttChannelHandler.java:37)
at nl.jk5.mqtt.MqttChannelHandler.channelRead0(MqttChannelHandler.java:11)
at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at nl.jk5.mqtt.MqttPingHandler.channelRead(MqttPingHandler.java:39)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1414)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:945)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:146)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Unknown Source)
2018-07-26 12:05:42,175 [nioEventLoopGroup-2-19] WARN i.n.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
java.lang.IllegalStateException: complete already: DefaultPromise@1377c4e(failure: java.util.concurrent.CancellationException)
Hello, I use the tb gateway 1.2.2, and I have a same problem.When I have tried to open the storage files in the /use/share/tb-gateway/bin/stroge/, I have experienced that every files are corrupted, so I have to remove these files.
tb gateway, tb service and mqtt broker all running locally on same windows 10 pc. the tb gateway is not able to maintain a stable connection to the tb service. this problem did not occur before updating to last 2.04 release, respectively last tb service 2.1.0. the tb gateway log:
and so on