-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] Unhandled InfluxDBException (timeout) #15443
Comments
I have been experiencing this too now a few times, resulting in the failure of the persistance service and resultingly the failure of my house heating. This issue seems to happen reliably at 06:30 in the morning, which happens to be the exact moment of when my influxdb backup is being executed. Timeline seems to be like this: 2023-09-02 06:25:02 influxdb backup started using the following command
2023-09-02 06:30:44 stack trace in openhab.log
2023-09-02 06:30:59 influxdb backup finished, confirmed using the stat command
|
Fix is already proposed, but needs review and merge. |
This issue has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/influxdb-persistence-stops-every-1-4-days/149446/3 |
I'm currently also having problems with influxdb in OpenHab not reconnecting after a server reboot. I did just take a look at the changes in #15452 and it seems that the fix was only applied to the influxdb v1 implementation. In #15062 the InfluxDBIOException was added to both files (influx1/InfluxDB1RepositoryImpl.java and influx2/InfluxDB2RepositoryImpl.java) but in #15452 the change from InfluxDBIOException to InfluxDBException was only made on the influx1/InfluxDB1RepositoryImpl.java. I don't know if this is correct or if this should also be changed in the v2 implementation. |
Same here. |
Are there any exceptions in the log? |
This is in the log: |
Nothing else? What exactly is in the log before? |
See #15879 |
Expected Behavior
InfluxDB Persistance Service should not crash and recover from a InfluxDBException (timeout) exception.
Current Behavior
Hey there,
for whatever reason I am getting a timeout every few days from my influxdb when openhab wants to write data to it.
The issue is that once this error occurs, openHab stops writing to influxdb forever until I restart openhab, even if InfluxDB is working again. It does not recover from that failed state until openhab gets restarted.
A very similar issue was already discussed and handled here in this commit:
d2e10ab
My Problem is that only "InfluxException" and "InfluxDBIOException" are handled there.
But I am getting a "InfluxDBException", which is not catched here and then it crashes the persistance service.
Possible Solution
The "InfluxDBIOException" extends "InfluxDBException" as you can see here so I think it should be safe to replace the recently added catch of "InfluxDBIOException" by "InfluxDBException" to catch both of them. InfluxDB's write() method always throws InfluxDBExceptions.
Then I would just get a error thrown on console (DEBUG Level) and it would try again later until InfluxDB responds again ...
Context
Has been discussed here
Your Environment
The text was updated successfully, but these errors were encountered: