[SOLVED] MQTT working fine, but causing warnings in the logs

I am running Openhab 2.4 with the embedded MQTT broker

Everything works fine. however the log is full of the following errrors, for any time there is an update on a subscribed topic:

2018-12-22 07:04:38.504 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_4b3c30da.c3bed

2018-12-22 07:07:05.997 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_e5977c29.18f66

2018-12-22 07:07:06.004 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_e5977c29.18f66

2018-12-22 07:07:38.007 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_b028b5bf.e9fc48

2018-12-22 07:07:38.012 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_b028b5bf.e9fc48

2018-12-22 07:09:09.174 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_be44a395.a0865

2018-12-22 07:09:09.193 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_be44a395.a0865

2018-12-22 07:14:07.543 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_c8b441e4.2cfef

2018-12-22 07:14:07.547 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_c8b441e4.2cfef

2018-12-22 07:17:10.340 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_9c5876c0.b1e7b8

2018-12-22 07:17:10.348 [WARN ] [moquette.spi.impl.SessionsRepository] - Session does not exist. CId=mqtt_9c5876c0.b1e7b8

Any ideas?

It’s not the mqtt binding, it’s the embedded broker. Moquette is very verbose when it comes to client connections with an already known client id but an invalid session.
I got in contact with the author and this is already changed, but not yet available for OH. You might just reduce the log level for that bundle (forum Search).

Cheers,
David

Is there any way for me to fix the invalid session?

Moquette would need to be configured to store client id sessions to disk to prevent this error. This can only be done in code.

I’m on day 2 of my OH 2.4 experiments and getting 5 of these messages alongside every MQTT message - and I’ve only got openhab and nodered connected on a single pi. I hate to imagine what it looks like once I’ve got all 20 or so of my mqtt devices connected!

Will this be “going away” anytime?

David - it seems (from other threads) that you recommend using mosquitto over the embedded broker - this seems like one more reason to shy away from the built in one?

Yes, as soon as we update Moquette to the new version. No ETA yet.

2 Likes

Looks like this problem still exists. Any news on this topic? My dirty workaround for this topic is, that I’m removing the /var/lib/openhab2/mqttembedded.bin file. It’s fine for me, because I don’t store data in MQTT… but that’s really dirty.

Funnily this is a new issue. Because the original one (wrong logging class) was fixed by me on the moquette broker, the hackish log hide-away we did on OH is not working anymore with the new version.

Cheers, David

1 Like

BTW: If I configure everything manually (files, not through the Paper UI), I’m not getting a *.bin file at all. Any idea why?