Persistence Problems: Influx & MapDB

I’m running openhabian on a raspberry pi 4.

I’m having weird problems with MapDB not restoring values even though the API shows that the values are there.

I also moved influx from the same server to a synology docker container, and if I set the IP address of the server to the new host, it works but does not survive a service restart or reboot - reverting to the previous settings.

If I want to wipe all persistence settings and start from scratch, what do I need to do? I’ve used openhabian-config to reset permissions to no avail.

so, this file here:

/var/lib/openhab/config/org/openhab/influxdb.config

had incorrect into in it. I changed it to the correct info.

I stopped the zRam service and confirmed that the right info was in the file.

I rebooted and the info now shows the old incorrect info.

Where does it come from? I’ve spent an hour researching/troubleshooting.

influxdb.cfg is the one you should edit, as per the docs. The influxdb.config version is system created.

Thanks @rossko57 … clearly my bad.

I hadn’t touched persistence configuration in about 3 years and forgot that it used a file in the services directory.

However, when I recently rebuilt a OH3 configuration from scratch, I pointed it at this new influx server through the UI and not through config files. Which I guess is what mislead me.

I guess if the influxdb.cfg file exists it overrides the UI configuration at restart? I’ll test that at some point.

How? I guess you mean using openhabian, not openHAB UI.

sorry, pre-coffee over here.

On a fresh install of openhabian on a RPi, I configured persistence through the Main UI:

none of these values are stored in influxdb.cfg (which is still the default config) and they survive a reboot, unlike the installation that does.

New feature to me.
I suspect if you tell openhabian about influxdb, it creates the text .cfg file.

First lets set a baseline.

Anything configured in files at /etc/openhab is going to take precedence over anything done in the UI.

Anything configured through the UI does not get saved to files in /etc/openhab. Instead they get saved to /var/lib/openhab.

It is not a great idea to modify any files on /var/lib/openhab while openHAB is running. These are files that are created by and managed by openHAB itself and any changes you make are likely to be overwritten as soon as you make them. For certain OH tends to dump it’s current settings and state to those files when it’s stopped.

Additional baseline:

If something isn’t working as expected, it is likely a typo somewhere (at least if you are me).

But you learn a lot in the process of troubleshooting.