anything in the addons folder?
check please:
/var/lib/openhab2/config/org/apache/karaf/features/repos.config
/var/lib/openhab2/config/org/apache/karaf/features.config
for any hardcoded M5 references (shouldn’t be any)
anything in the addons folder?
check please:
/var/lib/openhab2/config/org/apache/karaf/features/repos.config
/var/lib/openhab2/config/org/apache/karaf/features.config
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 )
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
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.
Yes
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?
try to edit the file and change M5 to M6…
on the other hand… this is not normal and shouldn’t happen
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)
y
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:
testing
using openhabian-config
/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)
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