UMHLens / OpenLens ·

Fixing No Connection to MQTT due to Pod Timeout

This troubleshooting guide provides a solution for fixing the problem of no connection to MQTT due to pod timeout in UMHLens/OpenLens. The guide explains the cause of the problem and provides step-by-step instructions for resolving the issue.

Fixing No Connection to MQTT due to Pod Timeout
ℹ️
This article was written for VerneMQ, might also occur on HiveMQ from version 0.9.10 onwards. Let us know if you are having this problem and if this article could still help you

When trying to establish a connection to MQTT in UMHLens/OpenLens, you may encounter a problem where the pods are not working properly and are being killed due to a timeout error. This guide will provide you with a solution to help you fix this issue and establish a connection to MQTT in UMHLens/OpenLens.

Problem

The problem of no connection to MQTT due to pod timeout can occur when there is a lot of data in vernemq's local database. This can cause the readiness probe of Kubernetes to fail, resulting in the pods being killed and preventing a connection to MQTT.

Readiness probe failed: Get ”<IP>/health”: contect deadline exceeded (Client. Timeout exceeded while awaiting headers)

Solution

  1. Go to the StatefulSets of the vernemq Pod: Access the StatefulSets of the vernemq pod and look for the initialDelaySeconds setting for livenessProbe and readinessProbe.
  2. Increase the initialDelaySeconds: Change the initialDelaySeconds for both livenessProbe and readinessProbe. The easiest way to do this is to add a "0" to the end of both settings.
  3. Save the Changes: Save the changes to the StatefulSets and wait for the vernemq pod to restart.
  4. Test the Connection: After the vernemq pod has restarted, test the connection to MQTT and verify that it is now working properly.

Read next

Share, Engage, and Contribute!

Discover how you can share your ideas, contribute to our blog, and connect with us on other platforms.