![title](https://learn.umh.app/assets/images/preloader.gif?v=bfa3701eeb)
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](/content/images/2023/02/Untitled-9.png)
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)
![](https://learn.umh.app/content/images/2023/02/Untitled-8.png)
Solution
- 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.
- 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.
- Save the Changes: Save the changes to the StatefulSets and wait for the vernemq pod to restart.
- Test the Connection: After the vernemq pod has restarted, test the connection to MQTT and verify that it is now working properly.
![](https://learn.umh.app/content/images/2023/02/2022-10-07_12h57_01.png)