MqDockerUp icon indicating copy to clipboard operation
MqDockerUp copied to clipboard

MQTT Protocol Version variable doesn't seem to work

Open Hakzel opened this issue 1 year ago • 1 comments

I have a problem because my MQTT Broker doesn't accept MQTT 5 Protocol Messages. When I start the MqDockerUp Container I get the following error messages:

mqdockerup  | Starting MqDockerUp V1.10.0 ...  
mqdockerup  | 
mqdockerup  | 16.08.2024 08:39:58 [info]        Connected to the database.
mqdockerup  | 16.08.2024 08:39:58 [error]       MQTT client connection error:  Connection refused: Unacceptable protocol version
mqdockerup  | 16.08.2024 08:39:58 [error]       MqDockerUp stopped due to an error
mqdockerup  | 16.08.2024 08:39:58 [error]       object
mqdockerup  | 16.08.2024 08:39:58 [error]       ErrorWithReasonCode: Connection refused: Unacceptable protocol version
mqdockerup  |     at handleConnack (/app/node_modules/mqtt/src/lib/handlers/connack.ts:47:15)
mqdockerup  |     at handle (/app/node_modules/mqtt/src/lib/handlers/index.ts:49:17)
mqdockerup  |     at work (/app/node_modules/mqtt/src/lib/client.ts:765:17)
mqdockerup  |     at Writable.writable._write (/app/node_modules/mqtt/src/lib/client.ts:789:4)
mqdockerup  |     at writeOrBuffer (/app/node_modules/mqtt/node_modules/readable-stream/lib/internal/streams/writable.js:334:12)
mqdockerup  |     at _write (/app/node_modules/mqtt/node_modules/readable-stream/lib/internal/streams/writable.js:283:10)
mqdockerup  |     at Writable.write (/app/node_modules/mqtt/node_modules/readable-stream/lib/internal/streams/writable.js:286:10)
mqdockerup  |     at Socket.ondata (node:internal/streams/readable:809:22)
mqdockerup  |     at Socket.emit (node:events:517:28)
mqdockerup  |     at Socket.emit (node:domain:489:12)
mqdockerup exited with code 0

when I change the MQTT Protocol Version in the Docker Compose file, MqDockerUp doesn't seem to try to connect at all. I tried with the following command under the environment to see if it reacts "MQTT_PROTOCOLVERSION: 5"

But then I only get the following output and nothing more happens:

mqdockerup  | Starting MqDockerUp V1.10.0 ... 
mqdockerup  | 
mqdockerup  | 16.08.2024 08:43:06 [info]        Connected to the database.
mqdockerup  | 16.08.2024 08:43:06 [info]        Database initialized successfully

It seems like the variable does something but I would expect the same error like before when forcing Version 5 but now it is not even trying to connect.

Anybody else with that issue?

Hakzel avatar Aug 16 '24 08:08 Hakzel

👋 Welcome to the project! Thank you for raising your first issue. We will look into it as soon as possible.

github-actions[bot] avatar Aug 16 '24 08:08 github-actions[bot]

Thanks for reaching out.

By default MqDockerUp establishes to connection using v5 so there is no need to change it.

MichelFR avatar Sep 24 '24 16:09 MichelFR