Influx not writing to database

Tags: #<Tag:0x00007f6173ea8310> #<Tag:0x00007f6173ea8220>

Platform information:

  • Hardware: Raspberry Pi 4 Model B Rev 1.2
  • OS: Raspbian GNU/Linux 10 (buster)
  • Java Runtime Environment: openjdk version “1.8.0_252”
  • openHAB version: 2.5.6-2

Issue of the topic:
After an apparently successful install of InfluxDB and Grafana via the openhabian-config utility, followed by installing the Influx Add-on in Paper UI and configuring my persist file, I can’t get OpenHAB to write to the database.

Here is a group if items, grouped under gFlood, that I’ll use to test it. Changes to the alarm states are confirmed to be recorded in the log.

   Number:Temperature     Sensor_Temp_Aeotec                   "Sensor Temperature"               <temperature>     (gFlood)                                        { channel="zwave:device:a5f14603:node3:sensor_temperature" }
   Number                 Battery_Level_Aeotec                 "Battery Level"                    <battery>         (gFlood)                                        { channel="zwave:device:a5f14603:node3:battery-level" }
   Number                 Alarm_Flood_Aeotec_Num1              "Aeotek flood alarm"               <alarm>           (gFlood)                                        { channel="zwave:device:a5f14603:node3:alarm_flood1" }
   Switch                 Alarm_Flood_Aeotec                   "Sump pump flood sensor"           <alarm>           (gFlood)                ["Switchable"]          { channel="zwave:device:a5f14603:node3:alarm_flood1" }
   Switch                 Alarm_Burglar_Aeotec                 "Aeotec burglar alarm"             <alarm>           (gFlood)                ["Switchable"]          { channel="zwave:device:a5f14603:node3:alarm_burglar" }
   Number                 Alarm_Flood_Dome_Num                 "Dome flood alarm"                 <alarm>           (gFlood)                                        { channel="zwave:device:a5f14603:node4:alarm_flood" }
   Switch                 Alarm_Flood_Dome                     "Water heater leak sensor"         <alarm>           (gFlood)                ["Switchable"]          { channel="zwave:device:a5f14603:node4:alarm_flood" }
   Number                 Battery_Level_Dome                   "Battery Level"                    <battery>         (gFlood)                                        { channel="zwave:device:a5f14603:node4:battery-level" }

Here is my persist file. Right now I have it set to record every minute just for testing purposes.

Strategies {
    everyMinute : "0 * * ? * *"
    everyHour   : "0 0 * * * ?"
    everyDay    : "0 0 0 * * ?"
}
Items {
	gFlood*   : strategy = everyMinute
}

The contents of thsi config file look right, except for something curious – the automatic installation asked me for a password for the “openhab” user account. The password that appears in this config file is NOT the one I entered during set up. Apparently it defaults to “openhabian” as the password no matter what you type. So should I edit this file? Which password is correct?

/etc/openhab2/services/influxdb.cfg:

user=openhab
password=openhabian
db=openhab_db
retentionPolicy=autogen
url=http://localhost:8086

/var/log/syslog and /var/log/openhab2/openhab.log have no influxdb entries for writes to the database. /var/lib/influxdb/data/ is empty and /var/lib/influxdb/meta/ has meta.db in it.

I went into influx to check further but couldn’t find any data:

Connected to http://localhost:8086 version 1.8.1
InfluxDB shell version: 1.8.1
> auth
username: admin
password:
> use openhab_db
Using database openhab_db
> select * from Alarm_Flood_Aeotec
>

I checked to see if influx is actually running:

openhabian@openhab:~ $ ps -ef  | grep -i influx
influxdb  6043     1  0 06:26 ?        00:00:00 /usr/bin/influxd -config /etc/influxdb/influxdb.conf
openhab+  6385  5471  0 06:33 pts/0    00:00:00 grep --color=auto -i influx

I’m at a loss right now. There are several other questions like mine in the forum but I couldn’t find my answer in them. Thanks.

the files’ name is influxdb.persist ?

Yes, influxdb.persist.

Not sure if this is helpful, but this is the syslog after I restart the Pi.

[14:07:00] openhabian@openhab:~$ grep -i influx /var/log/syslog
Jul 26 00:22:35 openhab influxd[8932]: ts=2020-07-26T05:22:35.789039Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEP08Z0000 op_name=retention_delete_check op_event=start
Jul 26 00:22:35 openhab influxd[8932]: ts=2020-07-26T05:22:35.789225Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEP08Z0000 op_name=retention_delete_check op_event=end op_elapsed=0.264ms
Jul 26 00:52:35 openhab influxd[8932]: ts=2020-07-26T05:52:35.789035Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEQi~o0000 op_name=retention_delete_check op_event=start
Jul 26 00:52:35 openhab influxd[8932]: ts=2020-07-26T05:52:35.789218Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEQi~o0000 op_name=retention_delete_check op_event=end op_elapsed=0.262ms
Jul 26 01:22:35 openhab influxd[8932]: ts=2020-07-26T06:22:35.788983Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OESRs30000 op_name=retention_delete_check op_event=start
Jul 26 01:22:35 openhab influxd[8932]: ts=2020-07-26T06:22:35.789174Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OESRs30000 op_name=retention_delete_check op_event=end op_elapsed=0.270ms
Jul 26 01:52:35 openhab influxd[8932]: ts=2020-07-26T06:52:35.789000Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEU9jJ0000 op_name=retention_delete_check op_event=start
Jul 26 01:52:35 openhab influxd[8932]: ts=2020-07-26T06:52:35.789191Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEU9jJ0000 op_name=retention_delete_check op_event=end op_elapsed=0.270ms
Jul 26 02:22:35 openhab influxd[8932]: ts=2020-07-26T07:22:35.789043Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEVsaZ0000 op_name=retention_delete_check op_event=start
Jul 26 02:22:35 openhab influxd[8932]: ts=2020-07-26T07:22:35.789227Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEVsaZ0000 op_name=retention_delete_check op_event=end op_elapsed=0.263ms
Jul 26 02:52:35 openhab influxd[8932]: ts=2020-07-26T07:52:35.789150Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEXaSoG000 op_name=retention_delete_check op_event=start
Jul 26 02:52:35 openhab influxd[8932]: ts=2020-07-26T07:52:35.789331Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEXaSoG000 op_name=retention_delete_check op_event=end op_elapsed=0.258ms
Jul 26 03:22:35 openhab influxd[8932]: ts=2020-07-26T08:22:35.789073Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEZJK30000 op_name=retention_delete_check op_event=start
Jul 26 03:22:35 openhab influxd[8932]: ts=2020-07-26T08:22:35.789260Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEZJK30000 op_name=retention_delete_check op_event=end op_elapsed=0.264ms
Jul 26 03:52:35 openhab influxd[8932]: ts=2020-07-26T08:52:35.789019Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEa1BJ0000 op_name=retention_delete_check op_event=start
Jul 26 03:52:35 openhab influxd[8932]: ts=2020-07-26T08:52:35.789201Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEa1BJ0000 op_name=retention_delete_check op_event=end op_elapsed=0.261ms
Jul 26 04:22:35 openhab influxd[8932]: ts=2020-07-26T09:22:35.789042Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEbk2Z0000 op_name=retention_delete_check op_event=start
Jul 26 04:22:35 openhab influxd[8932]: ts=2020-07-26T09:22:35.789223Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEbk2Z0000 op_name=retention_delete_check op_event=end op_elapsed=0.260ms
Jul 26 04:52:35 openhab influxd[8932]: ts=2020-07-26T09:52:35.788907Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEdSuo0000 op_name=retention_delete_check op_event=start
Jul 26 04:52:35 openhab influxd[8932]: ts=2020-07-26T09:52:35.789000Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEdSuo0000 op_name=retention_delete_check op_event=end op_elapsed=0.133ms
Jul 26 05:22:35 openhab influxd[8932]: ts=2020-07-26T10:22:35.788945Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEfAm30000 op_name=retention_delete_check op_event=start
Jul 26 05:22:35 openhab influxd[8932]: ts=2020-07-26T10:22:35.789126Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEfAm30000 op_name=retention_delete_check op_event=end op_elapsed=0.260ms
Jul 26 05:52:35 openhab influxd[8932]: ts=2020-07-26T10:52:35.789018Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEgtdJ0000 op_name=retention_delete_check op_event=start
Jul 26 05:52:35 openhab influxd[8932]: ts=2020-07-26T10:52:35.789201Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEgtdJ0000 op_name=retention_delete_check op_event=end op_elapsed=0.274ms
Jul 26 06:22:35 openhab influxd[8932]: ts=2020-07-26T11:22:35.789081Z lvl=info msg="Retention policy deletion check (start)" log_id=0ODwpSuG000 service=retention trace_id=0OEibVZ0000 op_name=retention_delete_check op_event=start
Jul 26 06:22:35 openhab influxd[8932]: ts=2020-07-26T11:22:35.789267Z lvl=info msg="Retention policy deletion check (end)" log_id=0ODwpSuG000 service=retention trace_id=0OEibVZ0000 op_name=retention_delete_check op_event=end op_elapsed=0.268ms
Jul 26 06:25:57 openhab influxd[8932]: [httpd] 127.0.0.1 - - [26/Jul/2020:06:25:57 -0500] "GET /ping HTTP/1.1" 204 0 "-" "okhttp/2.4.0" c6994ed2-cf32-11ea-801b-dca632939461 67
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.416109Z lvl=info msg="Signal received, initializing clean shutdown..." log_id=0ODwpSuG000
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.416263Z lvl=info msg="Waiting for clean shutdown..." log_id=0ODwpSuG000
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.416516Z lvl=info msg="Shutting down monitor service" log_id=0ODwpSuG000 service=monitor
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.416798Z lvl=info msg="Terminating precreation service" log_id=0ODwpSuG000 service=shard-precreation
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.416857Z lvl=info msg="Listener closed" log_id=0ODwpSuG000 service=snapshot
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.417015Z lvl=info msg="Terminating continuous query service" log_id=0ODwpSuG000 service=continuous_querier
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.417243Z lvl=info msg="Closing retention policy enforcement service" log_id=0ODwpSuG000 service=retention
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.417473Z lvl=info msg="Closed service" log_id=0ODwpSuG000 service=subscriber
Jul 26 06:26:53 openhab influxd[8932]: ts=2020-07-26T11:26:53.417649Z lvl=info msg="Server shutdown completed" log_id=0ODwpSuG000
Jul 26 06:26:53 openhab systemd[1]: Stopping InfluxDB is an open-source, distributed, time series database...
Jul 26 06:26:53 openhab systemd[1]: influxdb.service: Succeeded.
Jul 26 06:26:53 openhab systemd[1]: Stopped InfluxDB is an open-source, distributed, time series database.
Jul 26 06:26:53 openhab systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.512483Z lvl=info msg="InfluxDB starting" log_id=0OEirEI0000 version=1.8.1 branch=1.8 commit=af0237819ab9c5997c1c0144862dc762b9d8fc25
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.512604Z lvl=info msg="Go runtime" log_id=0OEirEI0000 version=go1.13.8 maxprocs=4
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.613871Z lvl=info msg="Using data dir" log_id=0OEirEI0000 service=store path=/var/lib/influxdb/data
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.613947Z lvl=info msg="Compaction settings" log_id=0OEirEI0000 service=store max_concurrent_compactions=2 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.613998Z lvl=info msg="Open store (start)" log_id=0OEirEI0000 service=store trace_id=0OEirEgG000 op_name=tsdb_open op_event=start
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614121Z lvl=info msg="Open store (end)" log_id=0OEirEI0000 service=store trace_id=0OEirEgG000 op_name=tsdb_open op_event=end op_elapsed=0.127ms
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614208Z lvl=info msg="Opened service" log_id=0OEirEI0000 service=subscriber
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614231Z lvl=info msg="Starting monitor service" log_id=0OEirEI0000 service=monitor
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614252Z lvl=info msg="Registered diagnostics client" log_id=0OEirEI0000 service=monitor name=build
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614272Z lvl=info msg="Registered diagnostics client" log_id=0OEirEI0000 service=monitor name=runtime
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614290Z lvl=info msg="Registered diagnostics client" log_id=0OEirEI0000 service=monitor name=network
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614340Z lvl=info msg="Registered diagnostics client" log_id=0OEirEI0000 service=monitor name=system
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614371Z lvl=info msg="Starting precreation service" log_id=0OEirEI0000 service=shard-precreation check_interval=10m advance_period=30m
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614408Z lvl=info msg="Starting snapshot service" log_id=0OEirEI0000 service=snapshot
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614522Z lvl=info msg="Starting continuous query service" log_id=0OEirEI0000 service=continuous_querier
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614561Z lvl=info msg="Starting HTTP service" log_id=0OEirEI0000 service=httpd authentication=true
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614582Z lvl=info msg="opened HTTP access log" log_id=0OEirEI0000 service=httpd path=stderr
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.614599Z lvl=info msg="Auth is enabled but shared-secret is blank. BearerAuthentication is disabled." log_id=0OEirEI0000 service=httpd
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.615487Z lvl=info msg="Listening on HTTP" log_id=0OEirEI0000 service=httpd addr=127.0.0.1:8086 https=false
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.615548Z lvl=info msg="Starting retention policy enforcement service" log_id=0OEirEI0000 service=retention check_interval=30m
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.615927Z lvl=info msg="Listening for signals" log_id=0OEirEI0000
Jul 26 06:26:53 openhab influxd[6043]: ts=2020-07-26T11:26:53.616372Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0OEirEI0000
Jul 26 06:31:50 openhab influxd[6043]: [httpd] 127.0.0.1 - - [26/Jul/2020:06:31:50 -0500] "GET /ping HTTP/1.1" 204 0 "-" "InfluxDBShell/1.8.1" 98e705b2-cf33-11ea-8001-dca632939461 232
Jul 26 06:32:05 openhab influxd[6043]: ts=2020-07-26T11:32:05.121996Z lvl=info msg="Executing query" log_id=0OEirEI0000 service=query query="SHOW DATABASES"
Jul 26 06:32:05 openhab influxd[6043]: [httpd] 127.0.0.1 - admin [26/Jul/2020:06:32:04 -0500] "POST /query?db=&epoch=ns&q=SHOW+DATABASES HTTP/1.1" 200 113 "-" "InfluxDBShell/1.8.1" a1918ab7-cf33-11ea-8002-dca632939461 206588
Jul 26 06:32:18 openhab influxd[6043]: ts=2020-07-26T11:32:18.119177Z lvl=info msg="Executing query" log_id=0OEirEI0000 service=query query="SELECT * FROM openhab_db.autogen.Alarm_Flood_Aeotec"
Jul 26 06:32:18 openhab influxd[6043]: [httpd] 127.0.0.1 - admin [26/Jul/2020:06:32:18 -0500] "POST /query?chunked=true&db=openhab_db&epoch=ns&q=select+%2A+from+Alarm_Flood_Aeotec HTTP/1.1" 200 57 "-" "InfluxDBShell/1.8.1" a96fdad8-cf33-11ea-8003-dca632939461 2491
Jul 26 06:41:59 openhab influxd[6043]: [httpd] 127.0.0.1 - - [26/Jul/2020:06:41:59 -0500] "GET /ping HTTP/1.1" 204 0 "-" "okhttp/2.4.0" 04305f0e-cf35-11ea-8004-dca632939461 56
Jul 26 06:56:53 openhab influxd[6043]: ts=2020-07-26T11:56:53.616133Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEk_5x0000 op_name=retention_delete_check op_event=start
Jul 26 06:56:53 openhab influxd[6043]: ts=2020-07-26T11:56:53.616363Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEk_5x0000 op_name=retention_delete_check op_event=end op_elapsed=0.295ms
Jul 26 07:26:53 openhab influxd[6043]: ts=2020-07-26T12:26:53.615953Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEmHyBl000 op_name=retention_delete_check op_event=start
Jul 26 07:26:53 openhab influxd[6043]: ts=2020-07-26T12:26:53.616050Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEmHyBl000 op_name=retention_delete_check op_event=end op_elapsed=0.136ms
Jul 26 07:56:53 openhab influxd[6043]: ts=2020-07-26T12:56:53.616104Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEn~pRl000 op_name=retention_delete_check op_event=start
Jul 26 07:56:53 openhab influxd[6043]: ts=2020-07-26T12:56:53.616292Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEn~pRl000 op_name=retention_delete_check op_event=end op_elapsed=0.268ms
Jul 26 08:26:53 openhab influxd[6043]: ts=2020-07-26T13:26:53.616105Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEpiggl000 op_name=retention_delete_check op_event=start
Jul 26 08:26:53 openhab influxd[6043]: ts=2020-07-26T13:26:53.616296Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEpiggl000 op_name=retention_delete_check op_event=end op_elapsed=0.271ms
Jul 26 08:56:53 openhab influxd[6043]: ts=2020-07-26T13:56:53.616088Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OErRYwl000 op_name=retention_delete_check op_event=start
Jul 26 08:56:53 openhab influxd[6043]: ts=2020-07-26T13:56:53.616277Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OErRYwl000 op_name=retention_delete_check op_event=end op_elapsed=0.269ms
Jul 26 09:26:53 openhab influxd[6043]: ts=2020-07-26T14:26:53.616098Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEt9QBl000 op_name=retention_delete_check op_event=start
Jul 26 09:26:53 openhab influxd[6043]: ts=2020-07-26T14:26:53.616290Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEt9QBl000 op_name=retention_delete_check op_event=end op_elapsed=0.270ms
Jul 26 09:56:53 openhab influxd[6043]: ts=2020-07-26T14:56:53.616096Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEusHRl000 op_name=retention_delete_check op_event=start
Jul 26 09:56:53 openhab influxd[6043]: ts=2020-07-26T14:56:53.616288Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEusHRl000 op_name=retention_delete_check op_event=end op_elapsed=0.269ms
Jul 26 10:26:53 openhab influxd[6043]: ts=2020-07-26T15:26:53.616108Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEwa8gl000 op_name=retention_delete_check op_event=start
Jul 26 10:26:53 openhab influxd[6043]: ts=2020-07-26T15:26:53.616299Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEwa8gl000 op_name=retention_delete_check op_event=end op_elapsed=0.274ms
Jul 26 10:56:53 openhab influxd[6043]: ts=2020-07-26T15:56:53.616114Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OEyI~wl000 op_name=retention_delete_check op_event=start
Jul 26 10:56:53 openhab influxd[6043]: ts=2020-07-26T15:56:53.616307Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OEyI~wl000 op_name=retention_delete_check op_event=end op_elapsed=0.272ms
Jul 26 11:26:53 openhab influxd[6043]: ts=2020-07-26T16:26:53.616178Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OE~0sBl000 op_name=retention_delete_check op_event=start
Jul 26 11:26:53 openhab influxd[6043]: ts=2020-07-26T16:26:53.616374Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OE~0sBl000 op_name=retention_delete_check op_event=end op_elapsed=0.338ms
Jul 26 11:56:53 openhab influxd[6043]: ts=2020-07-26T16:56:53.616098Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OF0jjRl000 op_name=retention_delete_check op_event=start
Jul 26 11:56:53 openhab influxd[6043]: ts=2020-07-26T16:56:53.616287Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OF0jjRl000 op_name=retention_delete_check op_event=end op_elapsed=0.268ms
Jul 26 12:26:53 openhab influxd[6043]: ts=2020-07-26T17:26:53.616102Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OF2Sagl000 op_name=retention_delete_check op_event=start
Jul 26 12:26:53 openhab influxd[6043]: ts=2020-07-26T17:26:53.616298Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OF2Sagl000 op_name=retention_delete_check op_event=end op_elapsed=0.274ms
Jul 26 12:56:53 openhab influxd[6043]: ts=2020-07-26T17:56:53.616133Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OF4ASx0000 op_name=retention_delete_check op_event=start
Jul 26 12:56:53 openhab influxd[6043]: ts=2020-07-26T17:56:53.616327Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OF4ASx0000 op_name=retention_delete_check op_event=end op_elapsed=0.270ms
Jul 26 13:26:53 openhab influxd[6043]: ts=2020-07-26T18:26:53.616097Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OF5tKBl000 op_name=retention_delete_check op_event=start
Jul 26 13:26:53 openhab influxd[6043]: ts=2020-07-26T18:26:53.616313Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OF5tKBl000 op_name=retention_delete_check op_event=end op_elapsed=0.294ms
Jul 26 13:56:53 openhab influxd[6043]: ts=2020-07-26T18:56:53.616117Z lvl=info msg="Retention policy deletion check (start)" log_id=0OEirEI0000 service=retention trace_id=0OF7bBRl000 op_name=retention_delete_check op_event=start
Jul 26 13:56:53 openhab influxd[6043]: ts=2020-07-26T18:56:53.616307Z lvl=info msg="Retention policy deletion check (end)" log_id=0OEirEI0000 service=retention trace_id=0OF7bBRl000 op_name=retention_delete_check op_event=end op_elapsed=0.269ms
Jul 26 13:43:05 openhab systemd[1]: Started InfluxDB is an open-source, distributed, time series database.
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.751305Z lvl=info msg="InfluxDB starting" log_id=0OF6omPl000 version=1.8.1 branch=1.8 commit=af0237819ab9c5997c1c0144862dc762b9d8fc25
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.751461Z lvl=info msg="Go runtime" log_id=0OF6omPl000 version=go1.13.8 maxprocs=4
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.900680Z lvl=info msg="Using data dir" log_id=0OF6omPl000 service=store path=/var/lib/influxdb/data
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.900910Z lvl=info msg="Compaction settings" log_id=0OF6omPl000 service=store max_concurrent_compactions=2 throughput_bytes_per_second=50331648 throughput_bytes_per_second_burst=50331648
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.910798Z lvl=info msg="Open store (start)" log_id=0OF6omPl000 service=store trace_id=0OF6on1W000 op_name=tsdb_open op_event=start
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.918984Z lvl=info msg="Open store (end)" log_id=0OF6omPl000 service=store trace_id=0OF6on1W000 op_name=tsdb_open op_event=end op_elapsed=8.194ms
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.949870Z lvl=info msg="Opened service" log_id=0OF6omPl000 service=subscriber
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.949944Z lvl=info msg="Starting monitor service" log_id=0OF6omPl000 service=monitor
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.949977Z lvl=info msg="Registered diagnostics client" log_id=0OF6omPl000 service=monitor name=build
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.950007Z lvl=info msg="Registered diagnostics client" log_id=0OF6omPl000 service=monitor name=runtime
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.950034Z lvl=info msg="Registered diagnostics client" log_id=0OF6omPl000 service=monitor name=network
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.950133Z lvl=info msg="Registered diagnostics client" log_id=0OF6omPl000 service=monitor name=system
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.950189Z lvl=info msg="Starting precreation service" log_id=0OF6omPl000 service=shard-precreation check_interval=10m advance_period=30m
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.950254Z lvl=info msg="Starting snapshot service" log_id=0OF6omPl000 service=snapshot
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.950309Z lvl=info msg="Starting continuous query service" log_id=0OF6omPl000 service=continuous_querier
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.971752Z lvl=info msg="Starting HTTP service" log_id=0OF6omPl000 service=httpd authentication=true
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.971848Z lvl=info msg="opened HTTP access log" log_id=0OF6omPl000 service=httpd path=stderr
Jul 26 13:43:07 openhab influxd[608]: ts=2020-07-26T18:43:07.971880Z lvl=info msg="Auth is enabled but shared-secret is blank. BearerAuthentication is disabled." log_id=0OF6omPl000 service=httpd
Jul 26 13:43:08 openhab influxd[608]: ts=2020-07-26T18:43:08.056249Z lvl=info msg="Listening on HTTP" log_id=0OF6omPl000 service=httpd addr=127.0.0.1:8086 https=false
Jul 26 13:43:08 openhab influxd[608]: ts=2020-07-26T18:43:08.056321Z lvl=info msg="Starting retention policy enforcement service" log_id=0OF6omPl000 service=retention check_interval=30m
Jul 26 13:43:08 openhab influxd[608]: ts=2020-07-26T18:43:08.056586Z lvl=info msg="Listening for signals" log_id=0OF6omPl000
Jul 26 13:43:08 openhab influxd[608]: ts=2020-07-26T18:43:08.080563Z lvl=info msg="Sending usage statistics to usage.influxdata.com" log_id=0OF6omPl000
Jul 26 14:02:19 openhab influxd[608]: [httpd] 127.0.0.1 - - [26/Jul/2020:14:02:19 -0500] "GET /ping HTTP/1.1" 204 0 "-" "okhttp/2.4.0" 8748d20f-cf72-11ea-8001-dca632939461 2561

Look at events.log and make sure your Items are receiving updates.

Look at your sitemap, the REST API or Karaf console to make sure the Items have a non-NULL/UNDEF state.

Show the definition of gFlood

There are lots of accounts on the machine:

Account Name Subsystem Purpose
openhabian operating system login account
openhab operating system account under which openHAB runs
openhab Karaf console account to log into the Karaf console, has nothing to do with the OS openhab account
openhab InfluxDB account used to log into InfluxDB, has nothing to do with the OS openhab account nor the Karaf console openhab account`

And it goes on with Grafana, Mosquitto, and more each potentially having their own accounts and passwords.

When it asked for the password for the “openhab user account” it’s referring to that second entry in the table above, not the last entry. Leave the config as it is. Even better, test it out by using openhab and openhabian to log into InfluxDB instead of admin. If you don’t get an authentication error you know the username and password are correct.

The log messages indicate that InfluxDB is up and running. Put the InfluxDB add-on into debug or trace logging and see if there is any activity in openhab.log from the add-on.

Did you install the InfluxDB add-on in openHAB itself?

Thanks a lot for your reply.

Confirmed.

Confirmed. Battery level and temperatures are being actively reported and shown in the SiteMap, and the alarm states are also showing when triggered.

See my items file above for the gFlood group. I edited my influxdb.persist file to just persist one item instead of a group just to see if this was it, but this did not change anything.

It looks like ‘openhab’ is the correct password, which is what I specified in the install.

I’ll do this and reply ASAP.

Yes.

There is no gFlood group defined. You can’t just tag an item with (gFlood). You have to define the group.

Group gFlood
Number:Temperature Sensor_Temp_Aeotec ...
...
1 Like

Sorry, it had been defined at the top of the file. In any case, I edited the influxdb.persist file to use just one item to avoid any group issues, ‘Battery_Level_Aeotec’. Here is what I see in the logs after enabling debugging:

2020-07-28 05:49:00.794 [TRACE] [.internal.InfluxDBPersistenceService] - Tried to get item from item class class org.openhab.core.library.items.NumberItem, state is 100
2020-07-28 05:49:00.797 [TRACE] [.internal.InfluxDBPersistenceService] - found no fractional part
2020-07-28 05:49:00.800 [DEBUG] [.internal.InfluxDBPersistenceService] - got DecimalType value 100
2020-07-28 05:49:00.803 [TRACE] [.internal.InfluxDBPersistenceService] - storing Battery_Level_Aeotec in influxdb value 100, Battery_Level_Aeotec (Type=NumberItem, State=100)
2020-07-28 05:49:01.183 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost
java.lang.RuntimeException: {"error":"authorization failed"}

I then edited the /etc/openhab2/services/influxdb.cfg file to use the password that I had specified during the install, instead of “openhabian”. Influx started writing to the database. This appears to be the root cause.

If you can go back and document the steps you took regarding InfluxDB installation and setting the passwords, there might be a bug here that needs to be files on the openHABian repo.

small shot in the dark


try this