Influx on PI3 stops writing

#1

Hey all.

Since I had big trouble getting my Raspi Pi3 with Debian Jessie, Openhab and InfluxDB to run for more than a few hours I think I have sorted it out and it seems to run quite fine now.
But why not some new troubles? InfluxDB 1.3 (or whatever the latest is as a armfh package) just stops writing datapoints after an undefined amount of time. Last time I got approx. 6 hours.
For the moment I just log new data every 5 minutes from a DIY weatherstation via MQTT through Openhab2 persistence service. I need to get a stable system before I fully embark on modifiying everything and add more data. So its just a test setup at the moment.
As I am a newbie to the Linux world I have no idea where to look for errors that cause Influx to stop writing.
If I systemctl status -l each and every service (Influx, Openhab, MQTT and Grafana) I can’t see anything wrong. They all work and influx reports that data is send from Openhab and requested by Grafana all the time. But all I get is the last value that Influx recorded before it stopped.
A restart of the whole PI seems to sort things out for a while. Restarting Influx or any other of the services did not seem to help.

EDIT: I have the databases for Influx setup on a permanently mounted USB stick (just in case its important). The Pi just killed too many sc cards and even other thumb drives before so I ddi not want to jeopardize the system drive :wink:

Cheers
Chris

#2

I have found this in the openhab2 log file and read that one should update to the latest influxdb-java version. But I have no clue how. Any hints apprecieted.
right now no new data is written to the DB at all.

2017-12-10 19:52:00.087 [ERROR] [org.influxdb.impl.BatchProcessor ] - Batch could not be sent. Data will be lost
retrofit.RetrofitError: Connection refused (Connection refused)
at retrofit.RetrofitError.networkError(RetrofitError.java:27)
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:395)[184:org.openhab.persistence.influxdb:1.10.0]
at retrofit.RestAdapter$RestHandler.invoke(RestAdapter.java:240)[184:org.openhab.persistence.influxdb:1.10.0]
at org.influxdb.impl.$Proxy109.writePoints(Unknown Source)[184:org.openhab.persistence.influxdb:1.10.0]
at org.influxdb.impl.InfluxDBImpl.write(InfluxDBImpl.java:151)[184:org.openhab.persistence.influxdb:1.10.0]
at org.influxdb.impl.BatchProcessor.write(BatchProcessor.java:171)[184:org.openhab.persistence.influxdb:1.10.0]
at org.influxdb.impl.BatchProcessor$1.run(BatchProcessor.java:144)[184:org.openhab.persistence.influxdb:1.10.0]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_151]
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)[:1.8.0_151]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)[:1.8$
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_151]
at java.lang.Thread.run(Thread.java:748)[:1.8.0_151]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.8.0_151]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)[:1.8.0_151]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)[:1.8.0_151]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)[:1.8.0_151]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[:1.8.0_151]
at java.net.Socket.connect(Socket.java:589)[:1.8.0_151]
at com.squareup.okhttp.internal.Platform.connectSocket(Platform.java:100)[184:org.openhab.persistence.influxdb:1.10.0]
at com.squareup.okhttp.internal.http.SocketConnector.connectRawSocket(SocketConnector.java:160)[184:org.openhab.persistence.i$
at com.squareup.okhttp.internal.http.SocketConnector.connectCleartext(SocketConnector.java:67)[184:org.openhab.persistence.in$
at com.squareup.okhttp.Connection.connect(Connection.java:152)[184:org.openhab.persistence.influxdb:1.10.0]
at com.squareup.okhttp.Connection.connectAndSetOwner(Connection.java:185)[184:org.openhab.persistence.influxdb:1.10.0]
at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)[184:org.openhab.persistence.influxdb:1.10.0]
at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed(Call.java:230)[184:org.openhab.persistence.influxdb:1.10.0]
at com.squareup.okhttp.Call.getResponseWithInterceptorChain(Call.java:201)[184:org.openhab.persistence.influxdb:1.10.0]
at com.squareup.okhttp.Call.execute(Call.java:81)[184:org.openhab.persistence.influxdb:1.10.0]
at retrofit.client.OkClient.execute(OkClient.java:53)[184:org.openhab.persistence.influxdb:1.10.0]
at retrofit.RestAdapter$RestHandler.invokeRequest(RestAdapter.java:326)[184:org.openhab.persistence.influxdb:1.10.0]
… 12 more