RRD4j value error. Cannot get which item causing this

Hi!

I have several errors on RRD4j persistence service stating that the item value must be between 0 and 100. Item must be somekind of a dimmer or a group with base type of dimmers. But the error message does not gives any hint on which item is the cause of the problem (I have >700 items). I’ve tried to set persistence service to DEBUG but the error message did not changed. Sorrounding log lines has no relation to the error as I checked several of them but they are not dimmer at all.

2021-12-06 15:46:01.397 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'QueryablePersistenceService.query()' on 'org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService@cd5aea6': Value must be between 0 and 100
java.lang.IllegalArgumentException: Value must be between 0 and 100
	at org.openhab.core.library.types.PercentType.validateValue(PercentType.java:93) ~[bundleFile:?]
	at org.openhab.core.library.types.PercentType.<init>(PercentType.java:52) ~[bundleFile:?]
	at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.mapToState(RRD4jPersistenceService.java:415) ~[?:?]
	at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.query(RRD4jPersistenceService.java:272) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	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) [?:?]
2021-12-06 15:46:01.401 [ERROR] [ence.internal.PersistenceManagerImpl] - Exception occurred while querying persistence service 'rrd4j': Value must be between 0 and 100
java.lang.IllegalArgumentException: Value must be between 0 and 100
	at org.openhab.core.library.types.PercentType.validateValue(PercentType.java:93) ~[bundleFile:?]
	at org.openhab.core.library.types.PercentType.<init>(PercentType.java:52) ~[bundleFile:?]
	at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.mapToState(RRD4jPersistenceService.java:415) ~[?:?]
	at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.query(RRD4jPersistenceService.java:272) ~[?:?]
	at jdk.internal.reflect.GeneratedMethodAccessor56.invoke(Unknown Source) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
	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) [?:?]

Is it possible to determine which of the items causing this? (I have four messages of these at startup recently) Or is it possible to have the error message to be customized (feature request?) to give back the originating item?

I’m on currently 3.2.M5 running in a docker container.

Thank you.

We can narrow it down at least. It’s complaining about a number that is between 0 and 100. That means we are working with a PercentType which is the state of a Dimmer.

Since the Item is happening at startup I’d guess that the problem is that restoreOnStartup is trying to restore a Dimmer Item with a value that isn’t an integer between 0 and 100. I wish the error reported the actual value and not just complain about it.

Anyway, you probably don’t have 700 dimmers so that can narrow the search.

It’s unusual that this is happening. Did it first start with M5 or has it been happening for awhile? If it was just introduced it might be a regression that needs to be fixed.

Stuff to look for:

  • Dimmer Items that used to be a Number
  • Dimmer Items that have not changed state in awhile
  • Make sure your rrd4j is saving values once per minute
  • In MainUI look at a chart of each of your Dimmer Items and verify that all the values stored are integers between 0 and 100. Alternatively use the REST API Docs to query for the values stored for each Item and review them that way.

This doesn’t answer what the problem is, but you can sidestep the problem by installing MapDB and configuring it to do restoreOnStartup and configuring rrd4j to not restoreOnStartup. This will kind of mask the problem but the root problem may not be something you care about.

Hi!

Thank you for your throughout explanation. Based on this I just searched my dimmer items and I found four battery levels staying at NULL. I deleted the corresponding RRD4j files and restarted OH. Errors gone. Thank you.

Zsolt.

2 Likes