Skip to content
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.

Failure to detect MQTT service on boot #8

Open
kb2ma opened this issue Jan 28, 2022 · 0 comments
Open

Failure to detect MQTT service on boot #8

kb2ma opened this issue Jan 28, 2022 · 0 comments

Comments

@kb2ma
Copy link

kb2ma commented Jan 28, 2022

I consistently see this error after a boot/reboot:

Error looking for MQTT service: HTTPConnectionPool(host='10.114.104.1', port=48484): Max retries exceeded with url: /v2/applications/state?apikey=d530c94d742e47c3895754d6e777786d (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7fb02a9700>: Failed to establish a new connection: [Errno 111]

The sensor service does not terminate on this error. Instead, the mqtt_detect() function that makes the HTTP request just returns false. If I later restart the sensor service, the error does not occur. So, somehow then the system is not ready for this request. Does it make sense to add a retry over several seconds? See 70ace12 for example.

This failure is serious for another service that depends on receiving sensor messages. As a workaround, I manually set the MQTT_ADDRESS environment variable to 'mqtt', and the sensor service sends the expected messages.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant