MQTT Thing/Broker become unresponsive

I connect to a few MQTT brokers including my Victron broker for my Solar data.
It happens from time to time that the broker-thing become unresponsive, so far the only way I could find to restart the mqtt connection is to restart the openhab2.service.
It’s a bit of a pain as you need to login into to terminal to run the “restart openhab2.service”.

  1. Is there a way to have the system check for “noncritical” errors and restart the service?
  2. Alternatively, a way to just restart the MQTT service rather than the whole system?
  3. Is there a way to restart the system without logging into the terminal?

The Victron Broker send quite a lot of info - it sends data to the broker every time the topic value changes, I am not sure if that could have an impact on the thing as well…

1 Like

Can you post some logs, please
It may be a bug

Where do I get the log?

Got it , thank you.

I know that the Victron System sends non json data from time to time but I have never been able to check what it is. ( I also use node red to process some of the data and it will give and error in the debug pane) So I am assuming that the same is happening with the binding.

This error seems to repeat but not at intervals - same as what I saw in node red.

2019-01-05 14:45:14.641 [ERROR] [ansport.mqtt.internal.ClientCallback] - MQTT message received. MqttMessageSubscriber#processMessage() implementation failure
java.lang.IllegalArgumentException: json string can not be null or empty
	at com.jayway.jsonpath.internal.Utils.notEmpty(Utils.java:386) ~[?:?]
	at com.jayway.jsonpath.internal.JsonContext.parse(JsonContext.java:81) ~[?:?]
	at com.jayway.jsonpath.JsonPath.read(JsonPath.java:502) ~[?:?]
	at org.eclipse.smarthome.transform.jsonpath.internal.JSonPathTransformationService.transform(JSonPathTransformationService.java:62) ~[?:?]
	at org.eclipse.smarthome.binding.mqtt.generic.internal.generic.ChannelStateTransformation.processValue(ChannelStateTransformation.java:81) ~[?:?]
	at org.eclipse.smarthome.binding.mqtt.generic.internal.generic.ChannelState.processMessage(ChannelState.java:146) ~[?:?]
	at org.eclipse.smarthome.io.transport.mqtt.internal.ClientCallback.lambda$3(ClientCallback.java:90) ~[245:org.eclipse.smarthome.io.transport.mqtt:0.10.0.oh240]
	at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:?]
	at org.eclipse.smarthome.io.transport.mqtt.internal.ClientCallback.messageArrived(ClientCallback.java:90) [245:org.eclipse.smarthome.io.transport.mqtt:0.10.0.oh240]
	at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:499) [241:org.eclipse.paho.client.mqttv3:1.2.0]
	at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:402) [241:org.eclipse.paho.client.mqttv3:1.2.0]
	at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:206) [241:org.eclipse.paho.client.mqttv3:1.2.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

Hello, Sometimes the Victron broker sends messages without content or null,
Could it be an openhab rule to ignore all these null or empty messages coming from the Victron broker?
Can anyone help me with this?

java.lang.IllegalArgumentException: json string can not be null or empty
        at com.jayway.jsonpath.internal.Utils.notEmpty(Utils.java:383)
        at com.jayway.jsonpath.internal.ParseContextImpl.parse(ParseContextImpl.java:36)
        at com.jayway.jsonpath.JsonPath.read(JsonPath.java:498)
        at org.openhab.transform.jsonpath.internal.JSonPathTransformationService.transform(JSonPathTransformationService.java:63)

Thank you