HELP! No items found

Hi,

After being shut down for about one month I took up my openhab server again today, untouched.
Now almost nothing works.
For instance I am not able to control anything from the app or basic UI.

When I try to access the REST interface I find out that:
http://x.x.x.x:8080/rest/items does not exist (404)!
But http://x.x.x.x:8080/rest/bindings and other pages seem to work.

I think this might be the cause for the problems I am seeing.
I can not find anything in the log that corresponds to this.
OH2 on Ubuntu 16.04 on an Intel NUC with rfxcom and z-stick.

Appreciate any ideas, help, suggestions!
/Tobias

Which version of OH 2 are you using?

Did you update/upgrade the version after bringing the server back up? For example, if you installed via apt-get and ran apt-get upgrade or apt-get dist-upgrade your OH would have been updated too.

How did you define your Items, in files or through one of the UIs?

If you are on the snapshot and have been getting updates, there have been a number of breaking changes that have been released in the past month or so which could have wiped out your Items, assuming that you created those Items in one of the UIs.

I found this in the log eventually:

2016-12-16 17:19:11.878 [ERROR] [org.eclipse.smarthome.storage.mapdb ] - [org.eclipse.smarthome.storage.mapdb(93)] The activate method has thrown an exception java.lang.AssertionError: unknown trans log instruction '4' at log offset: 8748

Aha! MAPDB is probably corrupted. But why?

I deleted the cache, tmp and mapdb files in userdata.

It took two restarts to get everything including z-wave working. Puh!
I have everything configured in things files so happily I did not have to recreate all links etc.

I’m on a pretty old version, think it is the first beta (how can I easily check?). Have not upgraded it and it is installed manually (but through a config manager).

My only suspision is that the big gap in time could have something to do with this?

I don’t know. When OH starts is lists the build number and if you log into the karaf console you can get the versions of the bundles using feature:list. The version will be the beta version (e.g. b4) or the datetime stamp when the feature was built. This gives you a good idea of the version.

I would recommend moving up to the latest snapshot or at least beta 4, though with the understanding that beta 5 is right around the corner and MapDB has been replaced as the configuration DB with JSONDB.

I can’t imagine it sitting there unused and unchanged would corrupt the DB, though it is conceivable that at the last shutdown or this recent startup something happened to corrupt the DB and the timing is merely a coincidence.

The good news is with the switch to JSONDB, such corruptions can be manually corrected as the DB is stored as plain text.

1 Like