New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[influxdb] persistence service does not recover from connection loss after UnknownHostException #16233
Comments
Fixes openhab#16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Fixes openhab#16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Fixes openhab#16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@kaistierl - can you try this: org.openhab.persistence.influxdb-4.2.0-SNAPSHOT.jar Although it's named 4.2, it should work with 4.1. Please uninstall the bundled version before dropping this to your addons directory. |
@kaistierl - can you verifiy the provided fix? |
Will do but have been too busy the last days. Will be able to test on friday latest. Anyway, thanks for the fast attempt to fix this! :) |
I was now able to verify the fix and can confirm that it works in my case. In the DEBUG log I now see several reconnection tries and as soon as InfluxDB is available again, the reconnection succeeds. |
Fixes #16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Fixes openhab#16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Fixes #16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Fixes openhab#16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Fixes openhab#16233 Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk> Signed-off-by: Jørgen Austvik <jaustvik@acm.org>
Expected Behavior
When the InfluxDB gets unavailable for a short time during operation, OpenHAB recovers from this condition and continues to write data as soon as InfluxDB is available again. This should work in a dockerized setup, where the InfluxDB container is stopped, and started again a few seconds later.
Current Behavior
When the InfluxDB container is stopped and started again during operation of OpenHAB, OpenHAB completely stops writing data and does not recover. It throws a
UnknownHostException
after the InfluxDB container was stopped and seems not to recover the connection once the InfluxDB would be available again.There is a
Connection lost, trying re-connection
message but even after some minutes, there is still nodatabase status is OK
message in the logs. Therefore, I suspect the reconnection logic to not work properly here.To recover from this, I need to manually run a
bundle:restart
of the InfluxDB persistence service. Then it works again and it even writes queued data from the "lost" minutes.Here is a log, I cut it right before the
bundle:restart
openhab_influx_connection_lost.log
persistence service config:
Steps to Reproduce (for Bugs)
url=http://influxdb:8086
with the InfluxDB container namedinfluxdb
).Your Environment
The text was updated successfully, but these errors were encountered: