MQTT Exception

Platform information:

  • Hardware: DiskStation 1511+
  • OS: 6.2.2
  • Java Runtime Environment: Java SE Development Kit 8u212
  • openHAB version: 2.4.0

So I’ve been using LWT to determine when my devices are back online, this mostly work but about 20% of the time, I’ll get an exception in the log rather than have my rule fired.

String Test_Light_LWT "LWT" {channel="mqtt:topic:embedded-mqtt-broker:Test_Light_Thing:Test_Light_Channel_LWT"}

rule "Test LWT Changed"
when
    Item Test_Light_LWT changed to "Online"
then
    logInfo("Test LWT Changed", "Online: " + triggeringItem.name);
end

And the exception:

[ERROR] [quette.server.netty.NettyMQTTHandler] - Unexpected exception while processing MQTT message. Closing Netty channel. CId=DVES_A36693
	java.io.IOException: Connection reset by peer
	 at sun.nio.ch.FileDispatcherImpl.read0(Native Method) ~[?:?]
	 at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39) ~[?:?]
	 at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:?]
	 at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:?]
	 at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[?:?]
	 at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1108) ~[236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:345) ~[236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:126) [236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645) [236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580) [236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497) [236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459) [236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886) [236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [236:org.eclipse.smarthome.io.mqttembeddedbroker:0.10.0.oh240]
	 at java.lang.Thread.run(Thread.java:748) [?:?]

I don’t think I can do much about it as this seems to be more of an internal issue. When this occurs, I don’t get the message in the log (rule not triggered) which is what I’m after. Any info on the subject would be greatly appreciated!

Thanks
Nic

The message comes from embedded broker, and I think relates to its communications with the remote device.

This post and answers may be of interest

I can’t say that I understand everything out of that other thread. But one of two things, either wait for the next release which I’d imagine we might not be too far from, or add a “publish trigger”. That last one I"m kind of clueless, any chance someone could point me into the right direction?

Thanks
Nic