Big +1 to this thread, I was struggling to figure out why my data wasn’t persisting. This was the final piece of the puzzle.
I made a few mistakes and did a few tests prior to getting to this point. I’m documenting them here in case someone else needs them:
-
I incorrectly named my persistence file
influx.persist
, it should beinfluxdb.persist
-
I verified I could log into Influx with the user I created for OpenHAB
$ influx -username 'openhab' -password '' > use openhab
(it will throw an error if the user can’t be authenticated or has the wrong permission set)
-
I set up a temporary persistence rule to store a sensor’s data every minute, so that I’d have data coming in.
-
I verified in /var/log/syslog that something was being sent every minute, and that it got an “ok” response.
$ tail /var/log/syslog ... influxd[xxx]: [httpd] ...
-
I made sure that
url
inservices/influxdb.cfg
matched the bind-address in/etc/influxdb/influxdb.conf
(the solution raised in this thread, probably 127.0.0.1:8086)