MQTT Troubleshooting Techniques
Problem
RediGate 100/400 is having trouble connecting to the MQTT broker. Common error messages seen the diagnostics:
20 13:30:31.35 MQttCLN0: Started RxTimeout[4]=37500
20 13:30:41.42 MQttCLN0: Closed TCP socket 127.0.0.1:1883
20 13:30:41.42 MQttCLN0: Socket receive error(-1)!!!!!
Troubleshooting Techniques
There are a number of potential causes for MQTT connectivity issues. The first two things to test when troubleshooting are:
- Make sure you can ping the MQTT server from the RediGate (MMI options 3,14)
- Confirm that the firewall settings on the MQTT server permit incoming TCP traffic from ports 1883 (unsecure) and 8883 (secure)
- Confirm that the username and password match that of the MQTT broker you are trying to connect to:
The steps below outline some diagnostic tools that can help identify and resolve the issue:
Viewing the MQTT Status
- In the RediGate command-line session, select "3" (for Diagnostic Services) and then "17" (for MQTT Status):
- Here you will see various diagnostic information about the current connectivity status of the RediGate
Viewing the MQTT Diagnostics
- If you need more detailed information about the status of the MQTT client, you can enable diagnostics by entering options 3, 6, 3, 4:
- After entering those values, press <enter> a few times to get back to the main menu, and then enter options 3, 99, y, <enter>
- The terminal will output all of the diagnostics data from MQTT client task. You can enable/disable other task diagnostics be following step 1 and entering option 3, 6, (task number of interest), 4. Press <enter> to pause the flow of the diagnostics data, and "X" to exit.
See Also: TLS Connection to MQTT Broker