Influx 2.0.1 Issue

  • Platform information:
    • openHAB version: 2.5.11
  • Issue of the topic: please be detailed explaining your issue

I have an issue after an InfluxDB update. That brought me to version 2.0.1, and now, I can’t access the DB anymore correctly.

I use persistence-influxdb - 1.14.0.

The config file looks like this:

# The database URL, e.g. or .
# Defaults to:

# The name of the database user, e.g. openhab.
# Defaults to: openhab

# The password of the database user.

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

# The retention policy to be used, needs to configured in InfluxDB
# Till v0.13: 'default', since v1.0: 'autogen'

On startup I receive the following error messages:

2020-12-18 20:17:49.665 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'QueryablePersistenceService.query()' on 'org.openhab.core.persistence.internal.QueryablePersistenceServiceDelegate@1e400705': {"code":"unauthorized","message":"Unauthorized"}
java.lang.RuntimeException: {"code":"unauthorized","message":"Unauthorized"}
	at org.influxdb.impl.InfluxDBErrorHandler.handleError( ~[?:?]
	at retrofit.RestAdapter$RestHandler.invoke( ~[?:?]
	at org.influxdb.impl.$Proxy162.query(Unknown Source) ~[?:?]
	at org.influxdb.impl.InfluxDBImpl.query( ~[?:?]
	at org.openhab.persistence.influxdb.internal.InfluxDBPersistenceService.query( ~[?:?]
	at org.openhab.core.persistence.internal.QueryablePersistenceServiceDelegate.query( ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_275]
	at sun.reflect.NativeMethodAccessorImpl.invoke( ~[?:1.8.0_275]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[?:1.8.0_275]
	at java.lang.reflect.Method.invoke( ~[?:1.8.0_275]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect( [bundleFile:?]
	at [bundleFile:?]
	at [?:1.8.0_275]
	at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_275]
	at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_275]
	at [?:1.8.0_275]

I needed to reconfigure Grafana, which uses Flux as query language. But openHAB is not able to post data into the repository.

Anyone experienced and solved similar issues?

1 Like

I don’t think this version supports influxdb 2 databases:

You will need the openHAB3 version of the persistence:

Wasn’t clear to me. So, I rolled back manually to version 1.8.3 which is running perfectly again.
Thank you!

Question: shall we use the openHAB3 version of the persistence even still on 2.5.11?

Stick to the 1.8.3 version of the persistence. Anything above won’t work on openHAB 2.5.