After migration 1.6-> 2.0.14 one particular device can't connect to MQTT broker - others can

Hi All,

I’m having a problem with connecting this particular device (https://www.satel.eu/en/product/10311/ETHM-A,Universal-monitoring-module) to MQTT broker after I’ve updated to version 2.0.14.

It worked 100% correctly prior to version bump (from something around 1.6.) We noticed connectivity problem on new facility (and newer mosquitto), compared mosquitto versions and upgraded broker used in test environment. The device stopped connecting also in our test environment (that used to have older version of mosquitto).

1654765725: Sending CONNACK to XXXXXXXX (0, 5)
1654765725: Client XXXXXXXX disconnected, not authorised.

Meanwhile, I’m able to connect to broker using e.g. MQTT Explorer, MQTTX. Broker is accessible from external network. I’ve used both user/pwd auth and allow_anonymous true option. Works fine with applications, not at all with mentioned device. My config entries

listener 1883
per_listener_settings true
password_file D:\Program Files\mosquitto\pwfile
allow_anonymous true

I used Wireshark and results of are:

not working
MQ Telemetry Transport Protocol, Connect Command
Header Flags: 0x10, Message Type: Connect Command
Msg Len: 37
Protocol Name Length: 4
Protocol Name: MQTT
Version: MQTT v3.1.1 (4)
Connect Flags: 0xc2, User Name Flag, Password Flag, QoS Level: At most once delivery (Fire and Forget), Clean Session Flag
Keep Alive: 0
Client ID Length: 12
Client ID: XXXXXXXX
User Name Length: 4
User Name: XXXX
Password Length: 5
Password: XXXXX

working
MQ Telemetry Transport Protocol, Connect Command
Header Flags: 0x10, Message Type: Connect Command
Msg Len: 47
Protocol Name Length: 4
Protocol Name: MQTT
Version: MQTT v3.1.1 (4)
Connect Flags: 0xc2, User Name Flag, Password Flag, QoS Level: At most once delivery (Fire and Forget), Clean Session Flag
Keep Alive: 60
Client ID Length: 22
Client ID: mqtt-explorer-443526b9
User Name Length: 4
User Name: XXXX
Password Length: 5
Password: XXXXX

What do I do to solve the problem? I’ve connected device manufacturer but no real support from them as they point toward broker provider.

Any help will be appreciated, thank you!

Aaaah, solved it myself.

The problem was Keep Alive parameter.
I manually had to set

max_keepalive 0

After the restart, the device started to connect. The problem is solved.

1 Like