InfluxDB nothing written to DB

Since a day, nothing gets written to my InfluxDB anymore. I do read from the database using some rules, and that works, so the connection is active. I switched on debug logging and don’t see anything in the log on writing persistence data.
I tried the REST API to query the items in the influxdb persistence and I get an empty response.

When I change the persistence file, I get the follow error in the log file:

2017-02-28 18:37:38.531 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'influxdb.persist'
2017-02-28 18:37:38.570 [WARN ] [.core.persistence.PersistenceManager] - Failed to delete cron job for dbId 'influxdb'
2017-02-28 18:37:38.702 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'influxdb.persist'
2017-02-28 18:37:38.718 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file '/etc/openhab2/persistence/influxdb.persist': null.
java.lang.NullPointerException
        at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.removeFutures(ExpressionThreadPoolManager.java:321)[100:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.remove(ExpressionThreadPoolManager.java:291)[100:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.remove(ExpressionThreadPoolManager.java:308)[100:org.eclipse.smarthome.core:0.9.0.b4]
        at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.removeTimers(PersistenceManagerImpl.java:321)[105:org.eclipse.smarthome.core.persistence:0.9.0.b4]
        at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.stopEventHandling(PersistenceManagerImpl.java:377)[105:org.eclipse.smarthome.core.persistence:0.9.0.b4]
        at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.removeConfig(PersistenceManagerImpl.java:348)[105:org.eclipse.smarthome.core.persistence:0.9.0.b4]
        at org.eclipse.smarthome.model.persistence.internal.PersistenceModelManager.modelChanged(PersistenceModelManager.java:85)[127:org.eclipse.smarthome.model.persistence:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[124:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[124:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[124:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[124:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[124:org.eclipse.smarthome.model.core:0.9.0.b4]
        at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[100:org.eclipse.smarthome.core:0.9.0.b4]
        at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]

Here is my persistence file:

Strategies {
	everyDay :	"0 0 0 * * ?"
	every5Min:	"0 0/5 5-23 * * ?"
	
	default = everyChange
}

Items {
	gPVEtotal*, gPVEtoday*, gPVPower*, gPVEmeter*	: 	strategy = every5Min, everyDay
	gEmeter*, Warmtepomp							:	strategy = everyChange
}

I am on OH2 release version running on a RaspberryPi 3 with openhabian. Does anyone have any suggestions?

1 Like

same problem

I think we have to restart openhab
for some reason it fails when you change the persistence file
so i try to restart with
sudo systemctl restart openhab2
and now i’ve data in influxdb

Yes, indeed. That works for me as well. The error it trows in the logfile above is exactly that.