MAPDB, persisted value not repopulating after restart

mapdb
openhab2
Tags: #<Tag:0x00007fe0576c5108> #<Tag:0x00007fe0576c4fc8>

(Mac McIlvaine) #1

openhabian (i.e. RaspberryPi)
openHAB 2.5.0~S1507-1 (Build #1507)
mapdb, influxdb

It appears that one of the mapdb persisted values are not being repopulated after restart.

I know they worked before I upgraded to 2.4. I think they were working after I went to the snapshot.

I noticed this because I need to restart a lot while going to the new mqtt binding and adding the influxdb.

I have one item on a slider in Habpanel. To check if the db is actually being updated I changed that slider and checked the access time on the mapdb file. It matches the change. I also looked at the db with an editor that can handle binary, and the value does seem to update.

(Edit: some of the above was written before I noted that other values are being repopulated) I did notice that the item in question is connected to a mqtt channel and the log shows it, on start up, getting set to UNDEF. Is this a clue?


(lipp_markus) #2

You upgraded to the snapshot version of 2.5 NOT the stable release of 2.4. You may want to use the stable version (2.4) or at the very least the milestone version 2.5M1. Unless you have a lot of knowledge, snapshot versions can be very frustrating as they tend to be more buggy.
You do not give enough information to help.


If your items are linked to MQTT binding, then this is known issue (just search the forum), otherwise, please give more info.


(Mac McIlvaine) #3

Thanks for the reply!

I had upgraded to 2.4 and then went to 2.5 because of other issues. (i.e. any changes in the mqtt .things file require a OH restart to get mqtt inbound messages working after the .things file is saved. 2.5 did not fix that…)

Sigh, you assume I didn’t search. But, I did. Obviously with the wrong search terms. Silly me, I searched for mapdb persistence issues, because I didn’t think is was an mqtt issue. Thanks to you, I searched for mqtt persistence issues and, as you note, there it is.

You assume I’ve never read that link, I have.

And, of course, I didn’t give much info. What I was asking for (and yes, poorly) was ideas on what to look for. Hard to give information and ask questions when you are not sure what the issue is.

As it turns out, I did give enough info for you to point me in the right direction. This post, in particular, seems to be exactly what I’m experiencing and poses a possible work around:


(Rich Koshak) #4

No. The original question did not provide us with enough information to help. There could be an infinity of things that could have gone wrong and we would need a ton more information to narrow down the potential causes.

But if you give us contradictory information and withhold information like what bindings you have installed how are we supposed to guess. We don’t expect you to know what the right information to give us is. If you knew that you could probably solve the problem yourself. But instead of withholding information, we expect you to bombard us with information, most of which will be irrelevant. But hopefully something in there will give us a clue we can use to help.

Not really. Lipp made a really good guess. I wrote the post you linked to and I didn’t think that was your problem based on the information in the ordinal post.


(Rich Koshak) #5

No. The original question did not provide us with enough information to help. There could be an infinity of things that could have gone wrong and we would need a ton more information to narrow down the potential causes.

But if you give us contradictory information and withhold information like what bindings you have installed how are we supposed to guess. We don’t expect you to know what the right information to give us is. If you knew that you could probably solve the problem yourself. But instead of withholding information, we expect you to bombard us with information, most of which will be irrelevant. But hopefully something in there will give us a clue we can use to help.

Not really. Lipp made a really good guess. I wrote the post you linked to and I didn’t think that was your problem based on the information in the ordinal post.


(Mac McIlvaine) #6

There was certainly no intent to withhold or give contradictory information. Please help me understand what was contradictory.

I noted the hardware platform, the release, the persistence db’s I have installed, and, though not explicitly, that I was using mqtt binding. Since I had no reason to suspect, for example, the Astro or ntp bindings I won’t have thought mention them.

I truly was looking for ideas on what to look for and ask about.

It’s obvious, now, that my paragraph about the mapdb getting updated correctly is probably not part of the problem. I assume it was my edit about the item being linked to an mqtt channel was what clued him.

As I said, I didn’t connect the dots from mapdb repopulate to mqtt channel until, after his reply, I searched for “persistence mqtt” instead of “mapdb persistence issue”.


(lipp_markus) #7

This I understand well and there is no problem with that, this is what the forum is for.

I was pondering whether I should reply to the rest or just let it go, but honestly, the tone of your answers is coming across as defensive and passive-aggressive and I do not care much for that.

Just know this:
Your post is the only information that was accessible…for example: how was I supposed to know what you did before you posted, I have no idea whether you searched…or were just too lazy to do so…your post certainly did not help one way or the other. How, was I supposed to know that you read the link on how to post a question…the style of your post did not give any indications that you had…

Another example: as you said, you were lost and ran out of ideas where to look, but then you made a decision what you considered to be relevant info and what not…without knowing what the issue was…

and yes your edit helped somewhat, but as I was primed on this topic from other posts, I just made a guess (there are not many ways the mapDB restore goes wrong) and I (and you) got lucky…otherwise we may have gone down other rabbit holes.


(Mac McIlvaine) #8

I agree the tone of my answers is probably defensive and passive aggressive. I apologize.

I gave no litany of what I’d searched or read, so I guess I deserved the padawan lecture.


(Rich Koshak) #9

I know there was no intent nor any ill will or anything like that. But we did lack some important information that you may have assumed we didn’t need, but you really are not in a position to know that. I’m sure you had the best of intentions.

Right, but did those of us on the forum daily we would have immediately noticed mqtt because ee usually know the common problems that exist in the most popular bindings. With

  • oh 2.4+
  • mqtt2
  • restoreOnStartup

we would have immediately realized what the problem was. The fact that Lipp guessed you were running MQTT was really just lucky. The interactions between all the bindings and all the parts of OH are complex in the extreme. Astro or NTP could very well cause problems like this. It’s at heart but it off the realm of the possible.

This is why we wrote the help us help you post and why we request so much information. We can’t expect the average user to know enough about how OH works or the current known issues to know what information is relevant and what information is not relevant.

Right, but if you had mentioned the bindings we would have been able to connect the dots for you. Lipp made a good educated guess

One reason we wrote the hour to ask posting is because we are stretched thin on this forum. We don’t have a many people or a much time to provide support as we would like. When a question is asked that doesn’t provide enough indignation information, it ends up consuming a lot of our time which takes away from our ability to help everyone in a timely manner.


(lipp_markus) #10

Thank you and no worries!!