InfluxDB 1.8.7 on Debian/Raspbian not starting (bug + fix)

In case your InfluxDB service stopped working after upgrading to 1.8.7, it is apparently a known problem:

The fix is trivial: set one script to executable, and restart the influxdb service:

chmod +x /usr/lib/influxdb/scripts/
systemctl restart influxdb.service

Thanks for solution, yesterday I was fighting with this and found it on github. I was able to set script to executable, but now got problems with saving data to influx. I see such error and I dont know what is happening. Did you have same behavior? Part from log is below:

2021-08-05 13:26:39.471 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost
org.influxdb.InfluxDBException: [shard 189] open /var/lib/influxdb/data/openhab_db/autogen/189/fields.idx.1.tmp: permission denied
	at org.influxdb.InfluxDBException.buildExceptionFromErrorMessage( ~[bundleFile:?]
	at org.influxdb.InfluxDBException.buildExceptionForErrorState( ~[bundleFile:?]
	at org.influxdb.impl.InfluxDBImpl.execute( ~[bundleFile:?]
	at org.influxdb.impl.InfluxDBImpl.write( ~[bundleFile:?]
	at org.influxdb.impl.OneShotBatchWriter.write( ~[bundleFile:?]
	at org.influxdb.impl.BatchProcessor.write( [bundleFile:?]
	at org.influxdb.impl.BatchProcessor$ [bundleFile:?]
	at java.util.concurrent.Executors$ Source) [?:?]
	at Source) [?:?]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$ Source) [?:?]
	at Source) [?:?]

Maybe your Influx data folders also have permission problems.

Have a look at the file permissions of /var/lib/influxdb/data/

openHABian will also apply this when you select option 14. Eventually one Influx restart is needed.

1 Like

I solved the problem with:
sudo chmod + x /usr/lib/influxdb/scripts/

sudo systemctl restart influxdb.service

but 4 days after the problem starts again! i have to uninstall influxdb and reinstall it and it works…but how long does it take? Do you have any solutions ?

thanks in advance

please be more specific in the description of what is happening again.
The thread title and the intro of your post let make me think that the x bit is gone.
Question then would be why you need to install the software again.
I assume that you have a different problem may be permssion of a subdirectory in /var/lib/influxdb/data/. But that is just a guess as it is not mentioned explicitly.

The execute bit is gone

This thread if dedicated for 1.8.7 but I had similar kind of problem like yours after upgrade to 1.8.9
I couldn’t trace any root cause of that problem so my only solution was:

sudo apt-get install --reinstall influxdb

After that there were no problems with influx.

I had to do the same as you, see if the problem does not reappear

The problem that occurs is the inability to start influx, with the error “access denied to war”, while I had done nothing on the server, the last update via apt get upgrade dated back to there is 20 days, apart from that this server has been running for 2 years without problem under linux ubuntu, to solve this strange problem I had to reinstall influxdb without doing anything else, and I had to do it 2 times in a row week. This time I’m under 1.8.9 and we’ll see if it works this time.

Thanks for your help

Here one of the first the log:

[ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost
retrofit.RetrofitError: Connexion refusée (Connection refused)
	at retrofit.RetrofitError.networkError( ~[retrofit-1.9.0.jar:?]
	at retrofit.RestAdapter$RestHandler.invokeRequest( ~[retrofit-1.9.0.jar:?]
	at retrofit.RestAdapter$RestHandler.invoke( ~[retrofit-1.9.0.jar:?]
	at org.influxdb.impl.$Proxy260.writePoints(Unknown Source) ~[?:?]
	at org.influxdb.impl.InfluxDBImpl.write( ~[influxdb-java-2.2.jar:?]
	at org.influxdb.impl.BatchProcessor.write( [influxdb-java-2.2.jar:?]
	at org.influxdb.impl.BatchProcessor$ [influxdb-java-2.2.jar:?]
	at java.util.concurrent.Executors$ [?:1.8.0_252]
	at java.util.concurrent.FutureTask.runAndReset( [?:1.8.0_252]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301( [?:1.8.0_252]
	at java.util.concurrent.ScheduledThreadPoolExecutor$ [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_252]
	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_252]
	at [?:1.8.0_252]
Caused by: Connexion refusée (Connection refused)
	at Method) ~[?:1.8.0_252]
	at ~[?:1.8.0_252]
	at ~[?:1.8.0_252]
	at ~[?:1.8.0_252]
	at ~[?:1.8.0_252]
	at ~[?:1.8.0_252]
	at com.squareup.okhttp.internal.Platform.connectSocket( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.internal.http.SocketConnector.connectRawSocket( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.internal.http.SocketConnector.connectCleartext( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.Connection.connect( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.Connection.connectAndSetOwner( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.OkHttpClient$1.connectAndSetOwner( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.internal.http.HttpEngine.nextConnection( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.internal.http.HttpEngine.connect( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.internal.http.HttpEngine.sendRequest( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.Call.getResponse( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.Call$ApplicationInterceptorChain.proceed( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.Call.getResponseWithInterceptorChain( ~[okhttp-2.4.0.jar:?]
	at com.squareup.okhttp.Call.execute( ~[okhttp-2.4.0.jar:?]
	at retrofit.client.OkClient.execute( ~[retrofit-1.9.0.jar:?]
	at retrofit.RestAdapter$RestHandler.invokeRequest( ~[retrofit-1.9.0.jar:?]

In same time during this error all http reguest and post fail: when i reinstall influxdb all run fine