InfluxDB not working after upgrade to OH3

Hello,
I want to inform that after switching from Openhab2 to Openhab3, with the same Influxdb infrastructure, in openhab.log file I have a series of errors like this:

[ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: connect timed out

[ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: timeout

Hi, I just upgrade my OH2.5 installation to OH3 and have the same issue.

Same here OH2.5 => OH3 upgrade and have the same issues… but they started showing up a few days after.

One more thing: I followed the setup instructions and I’m using a new Influxdb.

Finally, after the upgrade, I had to use RRD4J to restore the state at startup, as Influxdb binding does not work (It worked on OH 2.5.x)

I’m using Openhab 3.0.0 (Docker) on arm (RPI3) and Influxdb 1.8.3 on amd64 (Ubuntu 20.04 LTS)

Same issue here. I’m using the 3.1 snapshot version of the InfluxDB addon. At least it restores items on startup. But after a couple of hours, I get the same errors.

I have the same issue on a newly installed openhabian system. I use the installed InfluxDB from openhabian-config. It happens every few minutes - but not every time.

Environment

  • Rasperry Pi 3
  • openHAB 3.0.0
  • InfluxDB addon persistance 3.0.0
  • InfluxDB version 1.8.3

Error message in influxdb log

Jan 10 17:00:52 openhab influxd[465]: [httpd] 127.0.0.1 - openhab [10/Jan/2021:17:00:42 +0100] “POST /write?db=openhab&rp=autogen&precision=n&consistency=one HTTP/1.1” 500 20 “-” “okhttp/3.14.4” fe15940a-535c-11eb-813f-b827eb6babc7 10001820
Jan 10 17:00:54 openhab influxd[465]: ts=2021-01-10T16:00:52.987586Z lvl=error msg="[500] - “timeout”" log_id=0RcEBAgl000 service=httpd

Stacktrace from openhab.log

2021-01-10 16:56:29.312 [ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
org.influxdb.InfluxDBIOException: java.net.SocketTimeoutException: timeout
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:831) ~[bundleFile:?]
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:460) ~[bundleFile:?]
at org.influxdb.impl.OneShotBatchWriter.write(OneShotBatchWriter.java:22) ~[bundleFile:?]
at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:340) [bundleFile:?]
at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:287) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.net.SocketTimeoutException: timeout
at okio.Okio$4.newTimeoutException(Okio.java:232) ~[bundleFile:?]
at okio.AsyncTimeout.exit(AsyncTimeout.java:276) ~[bundleFile:?]
at okio.AsyncTimeout$2.read(AsyncTimeout.java:243) ~[bundleFile:?]
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:358) ~[bundleFile:?]
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230) ~[bundleFile:?]
at okhttp3.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.java:242) ~[bundleFile:?]
at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.java:213) ~[bundleFile:?]
at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.java:115) ~[bundleFile:?]
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:94) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[bundleFile:?]
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[bundleFile:?]
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[bundleFile:?]
at org.influxdb.impl.BasicAuthInterceptor.intercept(BasicAuthInterceptor.java:22) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[bundleFile:?]
at org.influxdb.impl.GzipRequestInterceptor.intercept(GzipRequestInterceptor.java:42) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[bundleFile:?]
at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:152) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[bundleFile:?]
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[bundleFile:?]
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229) ~[bundleFile:?]
at okhttp3.RealCall.execute(RealCall.java:81) ~[bundleFile:?]
at retrofit2.OkHttpCall.execute(OkHttpCall.java:188) ~[bundleFile:?]
at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:819) ~[bundleFile:?]
… 10 more

After a week of issues with the database and multiple restarts required per day, I reverted to Openhab 2.5.11 yesterday. All issues fixed. I will try migrating to Openhab 3 in a few months from now.