Error processing mqtt message

I set up MQTT 3-4 weeks ago. It worked fine.

Then we went on vacation and as we got back I am now seening errors. I have changed nothing in the interim period, and everything worked for days before we went away.

I get the following error everytime a message is received from MQTT. Why do I get these error and more importantly, how do I fix this?

2017-08-07 15:20:31.403 [ERROR] [.mqtt.internal.MqttMessageSubscriber] - Error processing MQTT message.
org.openhab.core.transform.TransformationException: An error occurred while opening file.
at org.openhab.core.transform.TransformationHelper$TransformationServiceDelegate.transform(TransformationHelper.java:62)[195:org.openhab.core.compat1x:2.1.0]
at org.openhab.binding.mqtt.internal.MqttMessageSubscriber.processMessage(MqttMessageSubscriber.java:138)[190:org.openhab.binding.mqtt:1.10.0]
at org.openhab.io.transport.mqtt.internal.MqttBrokerConnection.messageArrived(MqttBrokerConnection.java:556)[197:org.openhab.io.transport.mqtt:1.10.0]
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:475)[197:org.openhab.io.transport.mqtt:1.10.0]
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:379)[197:org.openhab.io.transport.mqtt:1.10.0]
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:183)[197:org.openhab.io.transport.mqtt:1.10.0]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]

2 Likes

That is funny :slight_smile:

Anyhow the config is super simple:

mqtt:iotbroker.url=tcp://localhost:1883
mqtt:iottbroker.qos=1

The Mosquitto service is running on the same RPi as OpenHAB.

Also, if I read the error correctly (which I very well might not) then it’s not a mqtt config issue, rather it is an issue related to processing the message specifically related to “Opening the file” - whatever that means?

What frustrates me is that I changed NOTHING. All I did was to update OpenHAB using:

a) sudo openhabian-config
b) 01 | Upgrade System : Upgrade all installed software packages to their newest version.

I was sort of hoping that someone could tell me what changed/broke with the latest updates?

2 Likes

Item configs and debug log would be helpful.

This would appear to indicate there’s a transform in place and the failure is in opening the file for the transform.

1 Like

Because it worked for weeks, personally I thing your Operating system ran out of file descriptors. The limit on linux per user is usually something like 65k. But imagine you receive two messages each minute: 3 weeks = 21 days = 504 hours = 30240 minutes and bam you are our of file descriptors.

This assumes that there is a serious bug in the used transformation that does not free used file descriptors (which is easy, you just need to forget the .close() call).

It might be another cause, check it with this command to count open file descriptors:
lsof | wc -l

Cheers,
David

1 Like

…and I assume you’ve tried the obvious… reboot? Same occurs after that?

Reboot: Not a good idea – yes, it is easy, but provides no chance in hell to find the root cause.

Is more like it… my rPi is running for 46 days and has 41000 open file descriptors… will check weekly to see, whether I need to be concerned. However, OH is only 400, and mosquitto some 20.