OH 3.1.0 InfluxDB stopped working after update to 1.8.7-1

Hi all,
yesterday my influxdb has stopped working after an update…
log errors (plenty) are:

2021-07-30 13:24:28.392 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost

org.influxdb.InfluxDBIOException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:8086

	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:829) [?:?]

Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:8086

	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:265) ~[bundleFile:?]

	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:183) ~[bundleFile:?]

	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224) ~[bundleFile:?]

	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108) ~[bundleFile:?]

	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88) ~[bundleFile:?]

	at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169) ~[bundleFile:?]

	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41) ~[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

Caused by: java.net.ConnectException: Connection refused (Connection refused)

	at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]

	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?]

	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?]

	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?]

	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:?]

	at java.net.Socket.connect(Socket.java:609) ~[?:?]

	at okhttp3.internal.platform.Platform.connectSocket(Platform.java:130) ~[bundleFile:?]

	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:263) ~[bundleFile:?]

	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:183) ~[bundleFile:?]

	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224) ~[bundleFile:?]

	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108) ~[bundleFile:?]

	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88) ~[bundleFile:?]

	at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169) ~[bundleFile:?]

	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41) ~[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

journalctl -u influxdb shows:

Jul 30 12:14:27 openHABianDevice systemd[1]: Starting InfluxDB is an open-source, distributed, time series database...
Jul 30 12:14:27 openHABianDevice systemd[596]: influxdb.service: Failed to execute command: Permission denied
Jul 30 12:14:27 openHABianDevice systemd[596]: influxdb.service: Failed at step EXEC spawning /usr/lib/influxdb/scripts/Jul 30 12:14:27 openHABianDevice systemd[1]: influxdb.service: Control process exited, code=exited, status=203/EXEC
Jul 30 12:14:27 openHABianDevice systemd[1]: influxdb.service: Failed with result 'exit-code'.
Jul 30 12:14:27 openHABianDevice systemd[1]: Failed to start InfluxDB is an open-source, distributed, time series databaJul 30 12:14:27 openHABianDevice systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Jul 30 12:14:27 openHABianDevice systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 1.
Jul 30 12:14:27 openHABianDevice systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.

tried several times to restart, stop-start influx with systemctl which outputs:

Job for influxdb.service failed because the control process exited with error code.
See "systemctl status influxdb.service" and "journalctl -xe" for details.

i can however manually start the database with
sudo influxd run -config /etc/influxdb/influxdb.conf

Anybody having the same error since yesterday?

for anyone having the same problem here’s a workaround atm:

4 Likes

Thank you for this! I’m having the same problem as well after the update, now the error messages related to InfluxDB are all gone after following this workaround. :+1:

2 Likes

I solved the problem changing file permissions.

sudo chmod +x /usr/lib/influxdb/scripts/influxd-systemd-start.sh
sudo systemctl restart influxdb.service

5 Likes

Fixed it for me - thanks @samtd

Thx @samtd!
I‘ve tried it with the ‚fix permissions‘ -option via openhabian-config previously and that didn‘t work. Perhaps someone could add your fix to it

thanks - solved my problem aswell!

Why don’t you do it yourself ? Open Source is Give and Take.

And if you had used an up to date version of openHABian, it would have corrected the permissions.

I allways update my openhab to the lates stable version…
Don‘t know how to change the source and just wanted to be helpful🤷‍♂️

This is about openHABian not openHAB. The ‘stable’ openHABian branch is for OH2 only.
As I said with the latest openHABian version it would have worked. You didn’t even mention the versions and branches you use so we cannot know if that’s really the right and latest one.

How to ask a good question / Help Us Help You - Tutorials & Examples - openHAB Community

Simple, all code is on Github. Any help is welcome so if you really want to be helpful then just put up a Pull Request.

I just did a

sudo apt-get update
sudo apt-get upgrade
sudo reboot

and I got the follwing error as well

2021-10-15 20:16:14.814 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost

org.influxdb.InfluxDBIOException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:8086

	at org.influxdb.impl.InfluxDBImpl.execute(InfluxDBImpl.java:831) ~[bundleFile:?]

The suggested solution did not work for me.

Is there an option to export my already done work in OH3, because in openhabian_conf in the menu option 4 there seems to be a possibility to “Import an openHAB 3 configuration from file or URL”

I found the option to save the config and restore again → So may be better for me to start again :frowning:

Then I would do a clean install.

Or any other suggestion how to fix this error now in a way that future updates keep working

My config

runtimeInfo:
  version: 3.1.0
  buildString: Release Build
locale: de-DE
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.12
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.50+19-CA
  osName: Linux
  osVersion: 5.10.63-v7l+
  osArchitecture: arm
  availableProcessors: 4
  freeMemory: 120032488
  totalMemory: 194772992
bindings:
  - http
  - modbus
  - senechome
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: true
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1.5
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 12
    language: de
    languages:
      - de
      - en-US
      - en
    onLine: true
    platform: Win32
  screen:
    width: 2560
    height: 1440
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:93.0) Gecko/20100101
    Firefox/93.0
timestamp: 2021-10-15T18:23:33.934Z

please try this:

If I understand that github thread, then everything should be solved with influx version 1.8.10 Right?

I have due to the apt-get update and upgrade now the version

influx -version
InfluxDB shell version: 1.8.10

So it seem to me that this version is not working even if I set the sleep from 1 to 10 I have the same problem.

Yes you are right. On my system with version 1.8.9 it worked putting the sleep parameter to 10.
I also upgraded to 1.8.10 on my testsystem without problem.

What is the output of this:

influxd

and this:

sudo systemctl status influxdb

So then a new install may not fix the problem?

The output is

openhabian@hab3:~ $ influxd

 8888888           .d888 888                   8888888b.  888888b.
   888            d88P"  888                   888  "Y88b 888  "88b
   888            888    888                   888    888 888  .88P
   888   88888b.  888888 888 888  888 888  888 888    888 8888888K.
   888   888 "88b 888    888 888  888  Y8bd8P' 888    888 888  "Y88b
   888   888  888 888    888 888  888   X88K   888    888 888    888
   888   888  888 888    888 Y88b 888 .d8""8b. 888  .d88P 888   d88P
 8888888 888  888 888    888  "Y88888 888  888 8888888P"  8888888P"

2021-10-16T11:50:32.075358Z     info    InfluxDB starting       {"log_id": "0XEEsNYl000", "version": "1.8.10", "branch": "1.8", "commit": "688e697c51fd"}
2021-10-16T11:50:32.075514Z     info    Go runtime      {"log_id": "0XEEsNYl000", "version": "go1.13.8", "maxprocs": 4}
2021-10-16T11:50:32.179988Z     info    Using data dir  {"log_id": "0XEEsNYl000", "service": "store", "path": "/var/lib/influxdb/data"}
2021-10-16T11:50:32.180666Z     info    Compaction settings     {"log_id": "0XEEsNYl000", "service": "store", "max_concurrent_compactions": 2, "throughput_bytes_per_second": 50331648, "throughput_bytes_per_second_burst": 50331648}
2021-10-16T11:50:32.181091Z     info    Open store (start)      {"log_id": "0XEEsNYl000", "service": "store", "trace_id": "0XEEsNyG000", "op_name": "tsdb_open", "op_event": "start"}
2021-10-16T11:50:32.202230Z     error   Unable to open series file      {"log_id": "0XEEsNYl000", "path": "/var/lib/influxdb/data/openhab/_series", "partition": 0, "error": "open /var/lib/influxdb/data/openhab/_series/00/0000: permission denied"}
2021-10-16T11:50:32.202458Z     info    Open store (end)        {"log_id": "0XEEsNYl000", "service": "store", "trace_id": "0XEEsNyG000", "op_name": "tsdb_open", "op_event": "end", "op_elapsed": "21.379ms"}
run: open server: open tsdb store: open /var/lib/influxdb/data/openhab/_series/00/0000: permission denied
openhabian@hab3:~ $

The result of

openhabian@hab3:~ $ sudo systemctl status influxdb
● influxdb.service - InfluxDB is an open-source, distributed, time series database
   Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-10-16 00:44:46 CEST; 20h ago
     Docs: https://docs.influxdata.com/influxdb/

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
openhabian@hab3:~ $

I would check the permissions of files and directories under /var/lib/influxdb/data/openhab/…
Do they all belong to influxd:influxdb ?

It looks to be okay. Maybe the flags are wrong

openhabian@hab3:~ $ cd /var/lib/influxdb/data/openhab
openhabian@hab3:/var/lib/influxdb/data/openhab $ ls -l
total 8
drwxrwsr-x 24 influxdb influxdb 4096 Oct 14 11:04 autogen
drwxrwsr-x 10 influxdb influxdb 4096 May 18 00:14 _series
openhabian@hab3:/var/lib/influxdb/data/openhab $ cd _series/
openhabian@hab3:/var/lib/influxdb/data/openhab/_series $ ls -l
total 32
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 00
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 01
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 02
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 03
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 04
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 05
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 06
drwxrwsr-x 2 influxdb influxdb 4096 Oct 15 19:45 07
openhabian@hab3:/var/lib/influxdb/data/openhab/_series $ cd 00
openhabian@hab3:/var/lib/influxdb/data/openhab/_series/00 $ ls -l
total 1024
-rw-rwSr-- 1 influxdb influxdb 4194304 Oct 10 19:01 0000
openhabian@hab3:/var/lib/influxdb/data/openhab/_series/00 $ cd ..
openhabian@hab3:/var/lib/influxdb/data/openhab/_series $ cd 01
openhabian@hab3:/var/lib/influxdb/data/openhab/_series/01 $ ls -l
total 1024
-rw-rwSr-- 1 influxdb influxdb 4194304 Oct 14 19:08 0000

I just started influx manually and I get following after entering also “journalctl -xe”

openhabian@hab3:~ $ systemctl start influxdb
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'influxdb.service'.
Authenticating as: ,,, (openhabian)
Password:
==== AUTHENTICATION COMPLETE ===
Job for influxdb.service failed because the control process exited with error code.
See "systemctl status influxdb.service" and "journalctl -xe" for details.
openhabian@hab3:~ $ journalctl -xe
--
-- An ExecStart= process belonging to unit influxdb.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit influxdb.service has entered the 'failed' state with result 'exit-code'.
Oct 16 22:11:51 hab3 systemd[1]: Failed to start InfluxDB is an open-source, distributed, time series database.
-- Subject: A start job for unit influxdb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit influxdb.service has finished with a failure.
--
-- The job identifier is 6246 and the job result is failed.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 5.
-- Subject: Automatic restarting of a unit has been scheduled
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Automatic restarting of the unit influxdb.service has been scheduled, as the result for
-- the configured Restart= setting for the unit.
Oct 16 22:11:51 hab3 systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
-- Subject: A stop job for unit influxdb.service has finished
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A stop job for unit influxdb.service has finished.
--
-- The job identifier is 6309 and the job result is done.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Start request repeated too quickly.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit influxdb.service has entered the 'failed' state with result 'exit-code'.
Oct 16 22:11:51 hab3 systemd[1]: Failed to start InfluxDB is an open-source, distributed, time series database.
-- Subject: A start job for unit influxdb.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit influxdb.service has finished with a failure.
--
-- The job identifier is 6309 and the job result is failed.
openhabian@hab3:~ $

and th status is

openhabian@hab3:~ $ systemctl status influxdb.service
● influxdb.service - InfluxDB is an open-source, distributed, time series database
   Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sat 2021-10-16 22:11:51 CEST; 3min 22s ago
     Docs: https://docs.influxdata.com/influxdb/
  Process: 29440 ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh (code=exited, status=1/FAILURE)

Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Service RestartSec=100ms expired, scheduling restart.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Scheduled restart job, restart counter is at 5.
Oct 16 22:11:51 hab3 systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Start request repeated too quickly.
Oct 16 22:11:51 hab3 systemd[1]: influxdb.service: Failed with result 'exit-code'.
Oct 16 22:11:51 hab3 systemd[1]: Failed to start InfluxDB is an open-source, distributed, time series database.
openhabian@hab3:~ $

Has anybody an idea what I could try next?

I have the following options:

  1. uninstall influx and reinstall, via apt-get
  2. Complete new install of openhabian an play back of my old configuration → I probably will lose my databases
  3. change the /usr/lib/influxdb/scripts/influxd-systemd-start.sh script to an older version. I found some thread telling that this may work

Actual contend of influxd-systemd-start.sh is

#!/bin/bash -e

/usr/bin/influxd -config /etc/influxdb/influxdb.conf $INFLUXD_OPTS &
PID=$!
echo $PID > /var/lib/influxdb/influxd.pid

PROTOCOL="http"
BIND_ADDRESS=$(influxd config | grep -A5 "\[http\]" | grep '^  bind-address' | cut -d ' ' -f5 | tr -d '"')
HTTPS_ENABLED_FOUND=$(influxd config | grep "https-enabled = true" | cut -d ' ' -f5)
HTTPS_ENABLED=${HTTPS_ENABLED_FOUND:-"false"}
if [ $HTTPS_ENABLED = "true" ]; then
  HTTPS_CERT=$(influxd config | grep "https-certificate" | cut -d ' ' -f5 | tr -d '"')
  if [ ! -f "${HTTPS_CERT}" ]; then
    echo "${HTTPS_CERT} not found! Exiting..."
    exit 1
  fi
  echo "$HTTPS_CERT found"
  PROTOCOL="https"
fi
HOST=${BIND_ADDRESS%%:*}
HOST=${HOST:-"localhost"}
PORT=${BIND_ADDRESS##*:}

set +e
attempts=0
url="$PROTOCOL://$HOST:$PORT/health"
result=$(curl -k -s -o /dev/null $url -w %{http_code})
while [ "${result:0:2}" != "20" ] && [ "${result:0:2}" != "40" ]; do
  attempts=$(($attempts+1))
  echo "InfluxDB API unavailable after $attempts attempts..."
  sleep 1
  result=$(curl -k -s -o /dev/null $url -w %{http_code})
done
echo "InfluxDB started"
set -e