[SOLVED] Persistence developed problems

Hi everyone i’m hoping for some help again

both my persistence services are behaving weird and have developed problems some stuff works but others not both services have errors

services used Infuxdb & mapdb

MAPDB (Restore everything on startup every change persisted)

most of this works fine as far as i can tell but my log is full of errors relating too mapdb differnet items

Example error repeated over and over different items

2019-03-07 20:38:56.999 [WARN ] [pse.smarthome.core.items.GenericItem] - failed notifying listener 'org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl@e65c13' about state update of item Bathroom_Motion_Last_Updated: null

java.lang.IndexOutOfBoundsException: null

	at java.nio.Buffer.checkIndex(Buffer.java:546) ~[?:?]

	at java.nio.HeapByteBuffer.getLong(HeapByteBuffer.java:416) ~[?:?]

	at org.mapdb.DataInput2.readLong(DataInput2.java:104) ~[?:?]

	at org.openhab.persistence.mapdb.internal.MapDBitemSerializer.deserialize(MapDBitemSerializer.java:81) ~[?:?]

	at org.openhab.persistence.mapdb.internal.MapDBitemSerializer.deserialize(MapDBitemSerializer.java:1) ~[?:?]

	at org.mapdb.BTreeMap$NodeSerializer.deserialize(BTreeMap.java:449) ~[?:?]

	at org.mapdb.BTreeMap$NodeSerializer.deserialize(BTreeMap.java:288) ~[?:?]

	at org.mapdb.Store.deserialize(Store.java:297) ~[?:?]

	at org.mapdb.StoreDirect.get2(StoreDirect.java:486) ~[?:?]

	at org.mapdb.StoreWAL.get2(StoreWAL.java:336) ~[?:?]

	at org.mapdb.StoreWAL.get(StoreWAL.java:320) ~[?:?]

	at org.mapdb.Caches$HashTable.get(Caches.java:246) ~[?:?]

	at org.mapdb.EngineWrapper.get(EngineWrapper.java:58) ~[?:?]

	at org.mapdb.BTreeMap.put2(BTreeMap.java:677) ~[?:?]

	at org.mapdb.BTreeMap.put(BTreeMap.java:643) ~[?:?]

	at org.openhab.persistence.mapdb.internal.MapDBPersistenceService.store(MapDBPersistenceService.java:161) ~[?:?]

	at org.openhab.core.persistence.internal.PersistenceServiceDelegate.store(PersistenceServiceDelegate.java:55) ~[?:?]

	at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.handleStateEvent(PersistenceManagerImpl.java:148) ~[?:?]

	at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.stateChanged(PersistenceManagerImpl.java:464) ~[?:?]

	at org.eclipse.smarthome.core.items.GenericItem$1.run(GenericItem.java:251) [102:org.eclipse.smarthome.core:0.10.0.oh240]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]

	at java.lang.Thread.run(Thread.java:748) [?:?]

INFLUX (Persistence service for graphs and everything else every change persisted)

This is the same some things are working somethings are not

will edit too update influx errors

The MapDB problem looks a little bit like a corrupted database. If so, about the only thing you can do is delete it and let it get rebuilt. The files are located in /var/lib/openhab2/persistence/mapdb. You probably want to stop OH running before you do this.

Of course, any Rules you have that depend on restoreOnStartup will have problems when it comes up.

Others have reported the InfluxDB problem. Some Items get updated, others do not.

I don’t know if these are exactly your problem. Are you seeing errors from that?

1 Like

Hi again @rlkoshak thanks for the reply

With different errors I’m wondering if this may be a corrupt card

Deleting the database and letting it rebuild seems too have stopped that error thanks for the advise there

I uninstalled the addon trying too solve the problem got reset it up so I’m unsure of the error myself at the moment

how should i reinstall influxdb using paperui addons section or using ssh openhabian-config add componant

Always a possibility. It try not to always jump to that conclusion first off, but the weird errors could be caused by that.

The actual database needs to be installed using openhabian-config. The binding that let’s OH talk to the database can be installed through PaperUI.

1 Like


Influx problems seem too be fixed sadly I can not report what I did too actually fix the error or even know what was causing the error

At a guess I would say it was a corrupt database the same as mapdb? All of this started after a full restore from Amanda

What I have changed in influx too fix the problem

I reran the openhabian config add influx… I also reinstalled the addon using paperui

All good for now back too adding new features and improvements thanks for the help on that Rich I was starting too think corrupt card or fresh install

Quite old this topic but I faced the same issue and solved it this way without OH restart.
This way I did not have problems with missing configuration of dummy Items or rules that depend on restoreOnStartup after restarting OH without working persistence.

bundle:stop org.openhab.persistence.mapdb

delete /var/lib/openhab2/persistence/mapdb

bundle:start org.openhab.persistence.mapdb

to have a quick update of the persitence I added quick_update strategy to my persistence

Strategies {

	quick_update : " 0 0/1 * * * ? *"
	default = everyChange
Items {
	OnChange* : strategy = everyChange, restoreOnStartup, quick_update

to my default OnChange