[SOLVED] Fail to start OpenHAB after upgrade to testing 2.4.0.M5 (or is it M6?)

anything in the addons folder?

check please:


for any hardcoded M5 references (shouldn’t be any)

from which build did you upgrade to M6 from? M5 or something else?

anything in the addons folder?

Do you mean this?

$ ls -l /var/lib/openhab2/tmp/mvn/org/openhab/distro/openhab-addons/
total 4
drwxrwxrwx 2 openhab openhabian 4096 Nov 22 20:30 2.4.0.M5
$ grep M5 /var/lib/openhab2/config/org/apache/karaf/features/repos.config
$ grep M5 /var/lib/openhab2/config/org/apache/karaf/features.config
featuresRepositories="mvn:org.openhab.distro/distro/2.4.0.M5/xml/features,\ mvn:org.openhab.distro/openhab-addons/2.4.0.M5/xml/features,\ mvn:org.apache.karaf.features/framework/4.2.1/xml/features,\ mvn:org.apache.karaf.features/standard/4.2.1/xml/features"

So there are indeed M5 references, how do I go about that?

from which build did you upgrade to M6 from? M5 or something else?

Not 100% sure, I think it was M5.

no, the /usr/share/openhab2/addons/

most likely, you have the M5 offline addon (*.kar) there

it extacts automagically into userdata/tmp

remove it from the addons folder and clear cache (again :slight_smile:)
you should be fine after that (no bets)

Nope, it’s empty:

$ ls -l /usr/share/openhab2/addons/
total 4
-rw-rw-r-- 1 openhab openhabian 70 Nov 20 13:13 README

ok, trying to reproduce this now… i just installed M5 and going to upgrade it to M6 to see what the heck is going on :slight_smile:

one quick check: does openhab-cli clean-cache really removes tmp & cache subfolders in userdata ?

Thanks. By the way:

$ find / -name '*.kar' -type f 2>/dev/null

Nothing found.


I cannot reproduce this with an M5->M6 upgrade

grep M /var/lib/openhab2/config/org/apache/karaf/features.config
featuresRepositories="mvn:org.openhab.distro/distro/2.4.0.M6/xml/features,\ mvn:org.openhab.distro/openhab-addons/2.4.0.M6/xml/features,\ mvn:org.apache.karaf.features/framework/4.2.1/xml/features,\ mvn:org.apache.karaf.features/standard/4.2.1/xml/features"

it has been correctly updated, all bindings in PaperUI show M6 and I don’t have in tmp any remains from M5…

ls -al /var/lib/openhab2/tmp/mvn/org/openhab/
total 20
drwxr-xr-x 5 openhab openhab 4096 16:11 23-Nov-2018 .
drwxr-xr-x 4 openhab openhab 4096 16:11 23-Nov-2018 ..
drwxr-xr-x 3 openhab openhab 4096 16:11 23-Nov-2018 binding
drwxr-xr-x 5 openhab openhab 4096 16:11 23-Nov-2018 core
drwxr-xr-x 4 openhab openhab 4096 16:11 23-Nov-2018 ui

can you try to redeploy M6 ?

What’s the best way to do that?

apt-get install --reinstall openhab2

Hmmm, did that, but still

$ grep M /var/lib/openhab2/config/org/apache/karaf/features.config
featuresRepositories="mvn:org.openhab.distro/distro/2.4.0.M5/xml/features,\ mvn:org.openhab.distro/openhab-addons/2.4.0.M5/xml/features,\ mvn:org.apache.karaf.features/framework/4.2.1/xml/features,\ mvn:org.apache.karaf.features/standard/4.2.1/xml/features"

Is there any way to get rid of that? :slight_smile:

try to edit the file and change M5 to M6…
on the other hand… this is not normal and shouldn’t happen :frowning:

Ah. My bad, after restarting OpenHAB the versions changed to M6. And if I clean the cache now, everything comes back online nicely. Thanks a lot!

For the recap:

sudo openhab-cli backup --full   # just in case
sudo systemctl stop openhab2.service
sudo apt-get install --reinstall openhab2
sudo openhab-cli clean-cache
sudo systemctl start openhab2.service

I’m trying to understand what originally went wrong .
Do I understand correctly that openhab was running when you originally cleared the cache ?

(the more the community understands what you did, the better we know what to warn people for)


1 Like

I’m trying to recollect now, I cannot say for sure if it was running.

However if it isn’t supposed to be running while clearing the cache then maybe openhab-cli must enforce that?

What I did was:

  1. Install OpenHABian from the image
  2. Switch to testing using openhabian-config
  3. Upgrade to the latest release
  4. Recover /etc/openhab2 and /var/lib/openhab2 from my own backup (not using openhabian-config).

And somewhere along the way it went wrong I guess.

this seems to be the root-cause…
most likely, you replaced the new /var/lib/openhab2/config/org/apache/karaf/features.config (pointing to M6 mvn repos) with the old one (pointing to M5 mvn repos)

1 Like

Worked for Me to thanks

Likewise, thanks heaps for the post - had me well confused! For completeness… it happened to me when reinstalling OpenHAB2, then restoring from an openhab backup (had back in October), then restoring userdata and config over the top (which I had a copy of from a few days ago) Your instructions cleaned up 99% of my issues up. Cheers