[solved] InfluxDB persistence not connecting to database

  • Hardware: x86 , 8G RAM
  • OS: MacOSX Sierra running Mac Mini
  • Java Runtime Environment: 1.8.0_162
  • openHAB version: 2.2.0
  • InfluxDB version: v1.5.1

My problem is that it looks like the persistence binding of InfluxDB is not loading. InfluxDB itself is up and running, but no data is being written to it (and nothing is really logged about the bundle starting).

Excerpt from the log when (after removing) I re-added the persistence add-on in PaperUI:

2018-03-25 09:48:51.495 [INFO ] [internal.service.FeaturesServiceImpl] - Adding features: openhab-persistence-influxdb/[1.11.0,1.11.0]
2018-03-25 09:48:53.660 [INFO ] [internal.service.FeaturesServiceImpl] -       mvn:org.openhab.persistence/org.openhab.persistence.influxdb/1.11.0
2018-03-25 09:48:53.662 [INFO ] [internal.service.FeaturesServiceImpl] -   mvn:org.openhab.persistence/org.openhab.persistence.influxdb/1.11.0
2018-03-25 09:48:53.772 [DEBUG] [ell.impl.action.osgi.CommandExtender] - org.openhab.persistence.influxdb (240): Starting destruction process
2018-03-25 09:48:53.772 [DEBUG] [ell.impl.action.osgi.CommandExtender] - org.openhab.persistence.influxdb (240): Not an extended bundle or destruction of extension already finished
2018-03-25 09:48:53.777 [DEBUG] [internal.service.FeaturesServiceImpl] - Configuration file /Users/raymond/openhab/conf/services/influxdb.cfg already exist, don't override it
2018-03-25 09:48:53.822 [DEBUG] [ell.impl.action.osgi.CommandExtender] - org.openhab.persistence.influxdb (240): Starting destruction process
2018-03-25 09:48:53.823 [DEBUG] [ell.impl.action.osgi.CommandExtender] - org.openhab.persistence.influxdb (240): Not an extended bundle or destruction of extension already finished
2018-03-25 09:48:53.849 [INFO ] [internal.service.FeaturesServiceImpl] -   org.openhab.persistence.influxdb/1.11.0
2018-03-25 09:48:53.913 [DEBUG] [mpl.info.InfoBundleTrackerCustomizer] - Ignore incorrect info null provided by bundle org.openhab.persistence.influxdb
2018-03-25 09:48:53.914 [INFO ] [g.apache.aries.spifly.dynamic.bundle] - Bundle Considered for SPI providers: org.openhab.persistence.influxdb
2018-03-25 09:48:53.914 [INFO ] [g.apache.aries.spifly.dynamic.bundle] - No 'SPI-Provider' Manifest header. Skipping bundle: org.openhab.persistence.influxdb

And that’s it. (OpenHAB en InfluxDB run on the same server hence my reference to 127.0.0.1)

influxdb.cfg:

url=http://127.0.0.1:8086
#The name of the database user, e.g. openhab.
# Defaults to: openhab
user=openhab

# The password of the database user.
password=openhab

# The name of the database, e.g. openhab.
# Defaults to: openhab
db=openhab_db

Logging on to influx from the commandline works fine, but there are no series.

$ influx -username openhab -password openhab

Connected to http://localhost:8086 version v1.5.1
InfluxDB shell version: v1.5.1
> show databases
name: databases
name
----
openhab_db
>
> use openhab_db
Using database openhab_db
> show series
>

influxdb.persist

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

Items {
//    gHeatAct*, gHeatSet*, gHeatValve*   : strategy = everyChange, everyHour
//    Presence_Phone                      : strategy = everyChange
    *                                   : strategy = everyUpdate, everyMinute
}

Any pointers as into why the InfluxDB persistence budle is not working?

If this happen just today and was running before it migth be the change to DST. In my case the stop/start of OH solved the problem.

No it never worked. I am just setting things up.

Please always use code fences when posting configurations, logs or something similar.

Thanks for the pointer!. Now hoping for an answer to the original question.

That’s way better :slight_smile:

Unfortunately I can’t see an obvious error.
Did you already install the compatibility layer?

Compatibility layer? As in the persistence service?

None of my persistence services are working… what am I missing…

I see no obvious problems in the setup besides the log. I would try to de install and install again, either via PaperUI or via Karaf.

1 Like

Okay this really was a noob thing… but have to say having two persistence directories is quite confusing. But you guessed it… I put the persist files in the wrong one.

Don’t put configuration files in “userdata”.