Openhab not writing/connecting to inlfux database

Good evening to all
I am slowly getting desperate. I’ve been trying for days to connect influx and grafana with openhab 3. I have a Raspberry Pi4 with openhabian. I have installed influx and grafana via the configurations menu.

in my influx.cfg it says:

url=http://192.168.9.112:8086
user=openhab
password=my_password
db=openhab
retentionPolicy=autogen

my influx.persist is:

Strategies
{
    everyMinute : "0 * * * * ?"
    everyHour : "0 0 * * * ?"
    everyDay : "0 0 0 * * ?"
    default = everyChange
}

Items
{
    Wetterstation_Temperatur : strategy = everyMinute
    Leistung_Phase_1 : strategy = everyChange
}

when I look at my logfiles I get countless error messages with which I can do nothing. Some of them indicate that something is wrong with the connection between openhab and influx.
I do not understand what I’m doing wrong, since I followed the instructions from the Internet. I hope you can help me.

19:37:46.176 [ERROR] [b.client.write.events.WriteErrorEvent] - The error occurred during writing of data
com.influxdb.exceptions.InfluxException: connect timed out
        at com.influxdb.client.internal.AbstractWriteClient.toInfluxException(AbstractWriteClient.java:577) ~[bundleFile:?]
        at com.influxdb.client.internal.AbstractWriteClient.lambda$new$12(AbstractWriteClient.java:181) ~[bundleFile:?]
        at io.reactivex.internal.subscribers.LambdaSubscriber.onNext(LambdaSubscriber.java:65) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableDoFinally$DoFinallySubscriber.onNext(FlowableDoFinally.java:84) [bundleFile:?]
        at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.drain(FlowableConcatMapMaybe.java:284) [bundleFile:?]
        at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.onNext(FlowableConcatMapMaybe.java:137) [bundleFile:?]
        at io.reactivex.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber.drain(FlowableConcatMapSingle.java:279) [bundleFile:?]
        at io.reactivex.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber.innerSuccess(FlowableConcatMapSingle.java:179) [bundleFile:?]
        at io.reactivex.internal.operators.mixed.FlowableConcatMapSingle$ConcatMapSingleSubscriber$ConcatMapSingleObserver.onSuccess(FlowableConcatMapSingle.java:317) [bundleFile:?]
        at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:64) [bundleFile:?]
        at io.reactivex.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:64) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableCollectSingle$CollectSubscriber.onComplete(FlowableCollectSingle.java:119) [bundleFile:?]
        at io.reactivex.internal.subscribers.BasicFuseableSubscriber.onComplete(BasicFuseableSubscriber.java:120) [bundleFile:?]
        at io.reactivex.internal.subscribers.BasicFuseableConditionalSubscriber.onComplete(BasicFuseableConditionalSubscriber.java:119) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.checkTerminated(FlowableGroupBy.java:686) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.drainNormal(FlowableGroupBy.java:626) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.drain(FlowableGroupBy.java:558) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableGroupBy$State.onComplete(FlowableGroupBy.java:548) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableGroupBy$GroupedUnicast.onComplete(FlowableGroupBy.java:474) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableGroupBy$GroupBySubscriber.onComplete(FlowableGroupBy.java:213) [bundleFile:?]
        at io.reactivex.processors.UnicastProcessor.checkTerminated(UnicastProcessor.java:430) [bundleFile:?]
        at io.reactivex.processors.UnicastProcessor.drainRegular(UnicastProcessor.java:314) [bundleFile:?]
        at io.reactivex.processors.UnicastProcessor.drain(UnicastProcessor.java:397) [bundleFile:?]
        at io.reactivex.processors.UnicastProcessor.onComplete(UnicastProcessor.java:487) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableWindowBoundarySupplier$WindowBoundaryMainSubscriber.drain(FlowableWindowBoundarySupplier.java:254) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableWindowBoundarySupplier$WindowBoundaryMainSubscriber.innerNext(FlowableWindowBoundarySupplier.java:166) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableWindowBoundarySupplier$WindowBoundaryInnerSubscriber.onNext(FlowableWindowBoundarySupplier.java:316) [bundleFile:?]
        at io.reactivex.processors.PublishProcessor$PublishSubscription.onNext(PublishProcessor.java:360) [bundleFile:?]
        at io.reactivex.processors.PublishProcessor.onNext(PublishProcessor.java:243) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableFlatMap$MergeSubscriber.tryEmit(FlowableFlatMap.java:282) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableFlatMap$InnerSubscriber.onNext(FlowableFlatMap.java:668) [bundleFile:?]
        at io.reactivex.subscribers.SerializedSubscriber.onNext(SerializedSubscriber.java:100) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableWindowTimed$WindowExactBoundedSubscriber.drainLoop(FlowableWindowTimed.java:498) [bundleFile:?]
        at io.reactivex.internal.operators.flowable.FlowableWindowTimed$WindowExactBoundedSubscriber$ConsumerIndexHolder.run(FlowableWindowTimed.java:579) [bundleFile:?]
        at io.reactivex.Scheduler$Worker$PeriodicTask.run(Scheduler.java:479) [bundleFile:?]
        at io.reactivex.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:66) [bundleFile:?]
        at io.reactivex.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:57) [bundleFile:?]
        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.SocketTimeoutException: connect timed out
        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) ~[?:?]
        at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:263) ~[?:?]
        at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:183) ~[?:?]
        at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224) ~[?:?]
        at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108) ~[?:?]
        at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88) ~[?:?]
        at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169) ~[?:?]
        at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]
        at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]
        at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]
        at com.influxdb.client.internal.GzipInterceptor.intercept(GzipInterceptor.java:91) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]
        at com.influxdb.client.internal.AuthenticateInterceptor.intercept(AuthenticateInterceptor.java:96) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]
        at okhttp3.logging.HttpLoggingInterceptor.intercept(HttpLoggingInterceptor.java:152) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]
        at com.influxdb.internal.UserAgentInterceptor.intercept(UserAgentInterceptor.java:52) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142) ~[?:?]
        at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117) ~[?:?]
        at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229) ~[?:?]
        at okhttp3.RealCall.execute(RealCall.java:81) ~[?:?]
        at retrofit2.OkHttpCall.execute(OkHttpCall.java:188) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybeMap$MapMaybeObserver.onSuccess(MaybeMap.java:82) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybeFromCallable.subscribeActual(MaybeFromCallable.java:61) ~[?:?]
        at io.reactivex.Maybe.subscribe(Maybe.java:4290) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybeMap.subscribeActual(MaybeMap.java:40) ~[?:?]
        at io.reactivex.Maybe.subscribe(Maybe.java:4290) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybeMap.subscribeActual(MaybeMap.java:40) ~[?:?]
        at io.reactivex.Maybe.subscribe(Maybe.java:4290) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybeToFlowable.subscribeActual(MaybeToFlowable.java:45) ~[?:?]
        at io.reactivex.Flowable.subscribe(Flowable.java:14935) ~[?:?]
        at io.reactivex.Flowable.subscribe(Flowable.java:14882) ~[?:?]
        at io.reactivex.internal.operators.flowable.FlowableRepeatWhen$WhenReceiver.onNext(FlowableRepeatWhen.java:100) ~[?:?]
        at io.reactivex.internal.operators.flowable.FlowableRetryWhen.subscribeActual(FlowableRetryWhen.java:62) ~[?:?]
        at io.reactivex.Flowable.subscribe(Flowable.java:14935) ~[?:?]
        at io.reactivex.internal.operators.flowable.FlowableSingleMaybe.subscribeActual(FlowableSingleMaybe.java:34) ~[?:?]
        at io.reactivex.Maybe.subscribe(Maybe.java:4290) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybeMap.subscribeActual(MaybeMap.java:40) ~[?:?]
        at io.reactivex.Maybe.subscribe(Maybe.java:4290) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybePeek.subscribeActual(MaybePeek.java:56) ~[?:?]
        at io.reactivex.Maybe.subscribe(Maybe.java:4290) ~[?:?]
        at io.reactivex.internal.operators.maybe.MaybeOnErrorNext.subscribeActual(MaybeOnErrorNext.java:46) ~[?:?]
        at io.reactivex.Maybe.subscribe(Maybe.java:4290) ~[?:?]
        at io.reactivex.internal.operators.mixed.FlowableConcatMapMaybe$ConcatMapMaybeSubscriber.drain(FlowableConcatMapMaybe.java:276) ~[?:?]
        ... 37 more

Parts of the error message look like influxdb might not be runnig.
To test if influxdb is running connect to the host that provides the influxdb service and execute:

sudo netstat -tulpn |grep influx

This should show something similar to:

tcp        0      0 127.0.0.1:8086          0.0.0.0:*               LISTEN      998/influxd         
tcp        0      0 127.0.0.1:8088          0.0.0.0:*               LISTEN      998/influxd

In my case influxdb and openhab are hosted both on the same Pi.
This is why it shows 127.0.0.1.
In case you host influxdb on a different server ( or on the same server but you use the hosts IP adress in your connection URL ) then instead of 127.0.0.1 it needs to show 0.0.0.0.

If you do not see any result at all then the influxdb service is not running.
An analysis why it is not running is required.
Have a look at the log files in folder /var/log/influxdb/, in log file /var/log/messages resp. by checking why the service is not running:

sudo systemctl status influxdb

In case the last command does not show “active running” in the output then

sudo journalctl -u influxdb

should provide more info about the reason why it is not running.

Many Thanks for your reply Wolfgang,
I also have both programs running on a PI. Therefore I have now changed the influxdb.conf:

enabled = true
bind-address = "127.0.0.1:8086"
auth-enabled = true

and the influxdb in the services folder:

url=http://127.0.0.1:8086
user=openhab
password=my_password
db=openhab
retentionPolicy=autogen

When I type sudo netstat -naptu | grep LISTEN | grep influxd as you mentioned. I get:

tcp        0      0 127.0.0.1:8088          0.0.0.0:*               LISTEN      1206/influxd
tcp        0      0 127.0.0.1:8086          0.0.0.0:*               LISTEN      1206/influxd

This looks prety like the output you got.The command

sudo systemctl status influxdb

gives:

influxdb.service - InfluxDB is an open-source, distributed, time series database
     Loaded: loaded (/lib/systemd/system/influxdb.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-01-19 20:48:09 CET; 9min ago
       Docs: https://docs.influxdata.com/influxdb/
    Process: 1201 ExecStart=/usr/lib/influxdb/scripts/influxd-systemd-start.sh (code=exited, status=0/SUCCESS)
   Main PID: 1206 (influxd)
      Tasks: 14 (limit: 4915)
        CPU: 1.060s
     CGroup: /system.slice/influxdb.service
             `-1206 /usr/bin/influxd -config /etc/influxdb/influxdb.conf

Jan 19 20:57:04 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:04 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 71f470a9-9>
Jan 19 20:57:06 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:06 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7325963f-9>
Jan 19 20:57:18 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:18 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7a4cbe75-9>
Jan 19 20:57:19 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:19 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7ae549b6-9>
Jan 19 20:57:21 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:21 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7c168964-9>
Jan 19 20:57:34 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:34 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 83d61b17-9>
Jan 19 20:57:36 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:36 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 850754dd-9>
Jan 19 20:57:49 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:49 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 8cc6e0c5-9>
Jan 19 20:57:51 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:57:51 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 8df8290b-9>
Jan 19 20:58:01 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:58:01 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 93edf943-9>

and

sudo journalctl -u influxdb

gives:

-- Journal begins at Thu 2023-01-19 20:37:56 CET, ends at Thu 2023-01-19 21:00:19 CET. --
Jan 19 20:48:04 openhabianPI4 systemd[1]: Starting InfluxDB is an open-source, distributed, time series database...
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1209]: Merging with configuration at: /etc/influxdb/influxdb.conf
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:07.088032Z lvl=info msg="InfluxDB starting" log_id=0fUu1aBl000 version=1.8.10 branch=1.8 commit=688e697c51fd
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:07.088107Z lvl=info msg="Go runtime" log_id=0fUu1aBl000 version=go1.13.8 maxprocs=4
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1398]: Merging with configuration at: /etc/influxdb/influxdb.conf
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:07.264797Z lvl=info msg="Using data dir" log_id=0fUu1aBl000 service=store path=/var/lib/influxdb/data
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:07.264949Z lvl=info msg="Compaction settings" log_id=0fUu1aBl000 service=store max_concurrent_compactions=2 throughput_bytes_per_second=50331648 throughpu>
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:07.265001Z lvl=info msg="Open store (start)" log_id=0fUu1aBl000 service=store trace_id=0fUu1at0000 op_name=tsdb_open op_event=start
Jan 19 20:48:07 openhabianPI4 influxd-systemd-start.sh[1201]: InfluxDB API unavailable after 1 attempts...
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1201]: InfluxDB API unavailable after 2 attempts...
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.451473Z lvl=info msg="Opened file" log_id=0fUu1aBl000 engine=tsm1 service=filestore path=/var/lib/influxdb/data/_internal/monitor/1/000000001-000000001>
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.501345Z lvl=info msg="Opened shard" log_id=0fUu1aBl000 service=store trace_id=0fUu1at0000 op_name=tsdb_open index_version=inmem path=/var/lib/influxdb/>
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.502024Z lvl=info msg="Open store (end)" log_id=0fUu1aBl000 service=store trace_id=0fUu1at0000 op_name=tsdb_open op_event=end op_elapsed=1237.023ms
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508391Z lvl=info msg="Opened service" log_id=0fUu1aBl000 service=subscriber
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508466Z lvl=info msg="Starting monitor service" log_id=0fUu1aBl000 service=monitor
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508489Z lvl=info msg="Registered diagnostics client" log_id=0fUu1aBl000 service=monitor name=build
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508509Z lvl=info msg="Registered diagnostics client" log_id=0fUu1aBl000 service=monitor name=runtime
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508525Z lvl=info msg="Registered diagnostics client" log_id=0fUu1aBl000 service=monitor name=network
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508551Z lvl=info msg="Registered diagnostics client" log_id=0fUu1aBl000 service=monitor name=system
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508585Z lvl=info msg="Starting precreation service" log_id=0fUu1aBl000 service=shard-precreation check_interval=10m advance_period=30m
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.508915Z lvl=info msg="Starting snapshot service" log_id=0fUu1aBl000 service=snapshot
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.509073Z lvl=info msg="Starting continuous query service" log_id=0fUu1aBl000 service=continuous_querier
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.516363Z lvl=info msg="Starting HTTP service" log_id=0fUu1aBl000 service=httpd authentication=true
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.516424Z lvl=info msg="opened HTTP access log" log_id=0fUu1aBl000 service=httpd path=stderr
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.516442Z lvl=info msg="Auth is enabled but shared-secret is blank. BearerAuthentication is disabled." log_id=0fUu1aBl000 service=httpd
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.517182Z lvl=info msg="Listening on HTTP" log_id=0fUu1aBl000 service=httpd addr=127.0.0.1:8086 https=false
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.525377Z lvl=info msg="Starting retention policy enforcement service" log_id=0fUu1aBl000 service=retention check_interval=30m
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.526019Z lvl=info msg="Listening for signals" log_id=0fUu1aBl000
Jan 19 20:48:08 openhabianPI4 influxd-systemd-start.sh[1206]: ts=2023-01-19T19:48:08.531965Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0fUu1aBl000
Jan 19 20:48:09 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:48:09 +0100] "GET /health HTTP/1.1" 200 107 "-" "curl/7.74.0" 33476bbd-9832-11ed-8001-dca632d27247 382
Jan 19 20:48:09 openhabianPI4 influxd-systemd-start.sh[1201]: InfluxDB started
Jan 19 20:48:09 openhabianPI4 systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Jan 19 20:49:13 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:49:13 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 59434aa8-9>
Jan 19 20:49:18 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:49:18 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 5c327172-9>
Jan 19 20:49:19 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:49:19 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 5ccb29a3-9>
Jan 19 20:49:33 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:49:33 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 6523701a-9>
Jan 19 20:49:35 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:49:35 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 66548d47-9>
Jan 19 20:49:48 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:49:48 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 6e1431f5-9>
Jan 19 20:49:50 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:49:50 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 6f453e85-9>
Jan 19 20:50:01 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:01 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 75d3d582-9>
Jan 19 20:50:03 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:03 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7704f2c7-9>
Jan 19 20:50:05 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:05 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7836336f-9>
Jan 19 20:50:14 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:14 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7d9398dc-9>
Jan 19 20:50:18 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:18 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 7ff5c438-9>
Jan 19 20:50:20 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:20 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 8126feff-9>
Jan 19 20:50:33 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:33 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 88e6a9fb-9>
Jan 19 20:50:35 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:35 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 8a17c077-9>
Jan 19 20:50:48 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:48 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 91d76f8d-9>
Jan 19 20:50:50 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:50:50 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 9308a8b4-9>
Jan 19 20:51:01 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:01 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 99970907-9>
Jan 19 20:51:03 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:03 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 9ac85eb8-9>
Jan 19 20:51:05 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:05 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" 9bf9710c-9>
Jan 19 20:51:15 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:15 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" a1ef5c26-9>
Jan 19 20:51:18 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:18 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" a3b903c1-9>
Jan 19 20:51:21 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:21 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" a582db4c-9>
Jan 19 20:51:33 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:33 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" aca9f7d8-9>
Jan 19 20:51:36 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:36 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" ae73aa54-9>
Jan 19 20:51:48 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:48 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" b59ab177-9>
Jan 19 20:51:51 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:51:51 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" b764802c-9>
Jan 19 20:52:01 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:52:01 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" bd5a4b62-9>
Jan 19 20:52:03 openhabianPI4 influxd-systemd-start.sh[1206]: [httpd] 127.0.0.1 - - [19/Jan/2023:20:52:03 +0100] "POST /api/v2/write?org=openhab&bucket=autogen&precision=ms HTTP/1.1 " 401 55 "-" "influxdb-client-java/unknown" be8b7a9b-9>
lines 1-62

In my limited opinion, it all looks like influx is running properly. What am I missing? The error is still exactly the same. I can also run influx in the console and see the existing databases.

Thanks for the help and best regards

What influxdb version is installed ? 1.X or 2.X ?
You may check that with

dpkg -l |grep -i influx

In case it is version 1.X try to add

`version=V1`

to your influxdb.conf in the services folder.

In case you use version 2.X then the influxdb.conf in the services folder requires several changes.

Many Thanks again Wolfgang,
That was the crucial clue! It is version 1.8.10-1! One line of code (version=V1) solved the problem.
Great. Thanks again.

P.S. I think I even read during my research that version 2 is not yet available for the PI.

1 Like