I’m asking for help as I tried everything to find the problem, but i’m stuck.
Using several (arround 5) MQTT Brokers, all working fine. except a recently added broker (EMQX, cloud based) that worked fine til i recently added one single additional subscription. I received no values, but found the following issue logged:
2025-05-22 16:21:30.542 [WARN ] [.transport.mqtt.MqttBrokerConnection] - Failed subscribing to topic /oh63dtu/1164abbca6f0/0/voltage
com.hivemq.client.mqtt.mqtt3.exceptions.Mqtt3SubAckException: SUBACK contains only Error Codes
The really strange thing is that the log says…hivemq…which is another broker in use, but this thing/item has nothing to do with hivemq…so i’m really surprised, and finally come to the conslusion that its a bug, maybe.
another strange thing is that a second subscription that worked fine, now alsow produces a similar error log. this oen worked for sure, and was never touched after introduction, again talking about hivemq, that is nto set or anyhow linked to these two things/items.
2025-05-22 16:21:30.394 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'j10592e0.ala.eu-central-1.emqxsl.com' with clientid oh63mqtt
2025-05-22 16:21:30.465 [INFO ] [rg.openhab.core.model.script.VenusGX] - MQTT Keep Alive Trigger
2025-05-22 16:21:30.542 [WARN ] [.transport.mqtt.MqttBrokerConnection] - Failed subscribing to topic /nukihub/lock/battery/voltage
com.hivemq.client.mqtt.mqtt3.exceptions.Mqtt3SubAckException: SUBACK contains only Error Codes
2025-05-22 16:21:30.542 [WARN ] [.transport.mqtt.MqttBrokerConnection] - Failed subscribing to topic /oh63dtu/1164abbca6f0/0/voltage
com.hivemq.client.mqtt.mqtt3.exceptions.Mqtt3SubAckException: SUBACK contains only Error Codes
I tried to restart the brokers, tried to restart openhab, did remove the cache, so almost all basic things that can be done, removed hivemq broker compeltely from config…nothing helped.
Anything else i coould try…??? im on 4.3.3 with a raspi5
Thanks Norbert
That’s an odd requirement. What is driving the need for so many brokers? I’m just curious.
The MQTT binding uses the HiveMQ MQTT library (as opposed to Paho). So naturally the error will include that in the package name. This has nothing to do with your HiveMQ broker.
I do see its using MQTT 3. Maybe the broker required MQTT 5? There’s a toggle on the Broker Thing config. Just something easy you could try and see if it makes a difference.
Does DEBUG level logs provide any additional info, like those SUBACK Error Codes perhaps?
Its rather strange, i now did comment/uncomment things within this emqx broker, and at a certain point the errors show up. i checked several times the basic limitations of EMQX but in terms of subscriptions there is no limit at all. i also do in parallel subscribe via MQTTexplorer for simulation purposes, and it all works fine.
As explaination in regards to multiple MQTT brokers, i have my personal one on my raspi that handles all internal stuff, i have another house that i want to integrate via MQTT, so i use this cloud based mqtt broker, i m using VICTRONs ESS battery/inverter system that has its own controller system, that uses beaglebone as core element, they provide another mqtt broker that i need to subscribe to in order to extract all its values…maybe i could reduce to 3-4 brokers. but i guess there is lots of people with more complex environments requiring more than one mqtt broker. i hope/guess this is something openhab is not really afraid of
One option you can do is broker bridging. MQTT brokers are able to connect to each other, so the clients just see the one broker but can publish to and subscribe from the other connected brokers.
That doesn’t address the problem here, but it is an alternative configuration that may or may not simplify things for you. There’s no reason OH can’t handle connecting to a bunch of brokers, though that’s probably a configuration that is not as well tested and used as connecting to two or less.
But these errors are not coming from your HiveMQ broker. They are coming from the library that OH uses. So the fact that it’s the same is mere coincidence and not related to the root cause of the problem.