Hi,
I’m not sure if this is an MQTT topic length problem, or a node-red issue or I am doing something wrong. Please help me directing the right way.
I have a running OH 2.4 setup with node-red. I tried a very simple scenario in node-red where I have an MQTT input and a debug output. I set the MQTT input’s topic to home/sensors/config/# then I send a message with MQTT explorer (or with a node-red inject object) to the home/config/sensors/config/get topic. Everything is fine I can see my test message in the debug window.
But if I set the MQTT input’s topic to home/sensors/config/get and I want to send the same message with the same way as before I will get an OH java.lang.IllegalStateException error in the log and the mqtt stops working for the sender client until I fully restart OH. In this case even if I update the MQTT input object to home/sensors/config/# I will receive the same exception in OH whatever message I’m sending with whatever topic. In the meanwhile other clients can communicate with the broker fine.
Is this also a known issue or limitation regarding the embedded MQTT? Can I only have 3 ‘tags’ in the topic?
Oh, the exact exception is:
2019-11-06 18:38:52.151 [WARN ] [netty.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: Target session RPi-Node-Red is connected but doesn't anymore subscribed to [filter:home/sensors/config/get, cliID: RPi-Node-Red, qos: null, active: true]
at io.moquette.spi.impl.subscriptions.CTrieSubscriptionDirectory.match(CTrieSubscriptionDirectory.java:116) ~[228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.spi.impl.subscriptions.CTrieSubscriptionDirectory.matches(CTrieSubscriptionDirectory.java:89) ~[228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.spi.impl.MessagesPublisher.publish2Subscribers(MessagesPublisher.java:76) ~[228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.spi.impl.Qos0PublishHandler.receivedPublishQos0(Qos0PublishHandler.java:59) ~[228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.spi.impl.ProtocolProcessor.processPublish(ProtocolProcessor.java:457) ~[228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.server.netty.NettyMQTTHandler.channelRead(NettyMQTTHandler.java:58) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.server.netty.metrics.MQTTMessageLogger.channelRead(MQTTMessageLogger.java:45) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.server.netty.metrics.MessageMetricsHandler.channelRead(MessageMetricsHandler.java:50) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:284) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.moquette.server.netty.metrics.BytesMetricsHandler.channelRead(BytesMetricsHandler.java:51) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:286) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1359) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:935) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:141) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [228:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
at java.lang.Thread.run(Thread.java:748) [?:?]