SHUred
(SHUred)
June 28, 2022, 10:04am
1
Platform information:
Hardware: Intel(R) Celeron(R) CPU J3455 @ 1.50GHz / 16 GB RAM
OS: TrueNAS-SCALE-22.02.2-MASTER-20220617-041230
openHAB version: 3.3.0 Release
Issue of the topic:
After the update of openHAB to 3.3.0 Release
via Image openhab/openhab:latest-alpine
(pushed yesterday by @wborn ?) all my Things were showing state uninitialized
UI is reachable
If logs where generated please post these here using code fences:
I was restarting my containers and this was the first thing that came up
2022-06-28 11:43:41.224 [INFO ] [org.openhab.ui.internal.UIService ] - Stopped UI
2022-06-28 11:44:24.483 [WARN ] [org.apache.felix.fileinstall ] - /usr/share/openhab/addons does not exist, please create it.
2022-06-28 11:44:24.501 [WARN ] [org.apache.felix.fileinstall ] - Root path does not exist: /usr/share/openhab/addons
So i checked if usr/share/openhab/addons
does exist
There is no such folder
Have there changes been made which i did not see?
I did not change anything to my setup and first thought about file permissions, but then i found out that the folder really is not present
Sorry if i missed changes for this release or something
For additional informatin, here some of my mounted volumes (docker-compose):
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "/mypath/openhab_addons:/openhab/addons"
- "/mypath/openhab_conf:/openhab/conf"
- "/mypath/openhab_userdata:/openhab/userdata"
I could try to go back to an older image if it helps
Thanks in advance
SHUred
(SHUred)
June 28, 2022, 3:02pm
2
OK, going back to 3.2.0-alpine
fixed the issue for me.
Not sure if i changes are necessary for using 3.3.0
Thanks
wborn
(Wouter Born)
June 28, 2022, 4:59pm
3
Maybe you’re using data that was previously used with an APT (Debian/Raspbian/openHABian) installation?
Then it is expected that you run into such issues because the containers use different paths, see also:
opened 09:44AM - 07 Feb 19 UTC
karaf
openHAB writes absolute paths to `userdata` and hence moving its directory is no… t trivial (one has to do something like `sed`ing the `userdata`).
oH sets the directory to the absolute path here: https://github.com/openhab/openhab-distro/blob/14a9fd15f45960a7651bbc299b9f8ee876d6a8e0/distributions/openhab/src/main/resources/bin/oh2_dir_layout#L35
Here's an example from my test installation:
```
% grep -r /Users/dottedmag . | grep -v logs
Binary file ./userdata/cache/org.eclipse.osgi/framework.info.96 matches
./userdata/config/org/jupnp.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.jupnp.cfg"
./userdata/config/org/eclipse/smarthome/audio.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.eclipse.smarthome.audio.cfg"
./userdata/config/org/eclipse/smarthome/voice.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.eclipse.smarthome.voice.cfg"
./userdata/config/org/ops4j/pax/web.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.ops4j.pax.web.cfg"
./userdata/config/org/ops4j/pax/web.config:org.ops4j.pax.web.config.file="/Users/dottedmag/w/home-automation/openhab/runtime/etc/jetty.xml"
./userdata/config/org/ops4j/pax/url/mvn.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.ops4j.pax.url.mvn.cfg"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.defaultRepositories="file:/Users/dottedmag/w/home-automation/openhab/runtime/system@id\=system.repository@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar@id\=kar.repository@multi@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/system@id\=child.system.repository@snapshots"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.localRepository="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/mvn"
./userdata/config/org/ops4j/pax/logging.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.ops4j.pax.logging.cfg"
./userdata/config/org/apache/karaf/log.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.log.cfg"
./userdata/config/org/apache/karaf/jaas.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.jaas.cfg"
./userdata/config/org/apache/karaf/features.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.features.cfg"
./userdata/config/org/apache/karaf/features/repos.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.features.repos.cfg"
./userdata/config/org/apache/karaf/kar.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.kar.cfg"
./userdata/config/org/apache/karaf/kar.config:karStorage="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar"
./userdata/config/org/apache/karaf/shell.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.shell.cfg"
./userdata/config/org/apache/karaf/shell.config:hostKey="/Users/dottedmag/w/home-automation/openhab/userdata/etc/host.key"
./userdata/config/org/apache/karaf/command/acl/scope_bundle.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.scope_bundle.cfg"
./userdata/config/org/apache/karaf/command/acl/jaas.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.jaas.cfg"
./userdata/config/org/apache/karaf/command/acl/kar.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.kar.cfg"
./userdata/config/org/apache/karaf/command/acl/bundle.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.bundle.cfg"
./userdata/config/org/apache/karaf/command/acl/shell.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.shell.cfg"
./userdata/config/org/apache/karaf/command/acl/system.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.system.cfg"
./userdata/config/org/apache/karaf/command/acl/config.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.config.cfg"
./userdata/config/org/apache/karaf/command/acl/feature.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.karaf.command.acl.feature.cfg"
./userdata/config/org/apache/felix/fileinstall/351e53bd-e924-46e3-a384-9feb7eef114e.config:felix.fileinstall.dir="/Users/dottedmag/w/home-automation/openhab/addons"
./userdata/config/org/apache/felix/fileinstall/351e53bd-e924-46e3-a384-9feb7eef114e.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.felix.fileinstall-deploy.cfg"
./userdata/config/org/apache/felix/fileinstall/351e53bd-e924-46e3-a384-9feb7eef114e.config:felix.fileinstall.tmpdir="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/bundles"
./userdata/config/org/apache/felix/fileinstall/64e8fb94-2b2a-49ff-b884-770f384aec11.config:felix.fileinstall.dir="/Users/dottedmag/w/home-automation/openhab/addons"
./userdata/config/org/apache/felix/fileinstall/64e8fb94-2b2a-49ff-b884-770f384aec11.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.felix.fileinstall-deploy.cfg"
./userdata/config/org/apache/felix/fileinstall/64e8fb94-2b2a-49ff-b884-770f384aec11.config:felix.fileinstall.tmpdir="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/bundles"
./userdata/config/org/apache/felix/eventadmin/impl/EventAdmin.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/org.apache.felix.eventadmin.impl.EventAdmin.cfg"
./userdata/config/jmx/acl/org/apache/karaf/bundle.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/jmx.acl.org.apache.karaf.bundle.cfg"
./userdata/config/jmx/acl/org/apache/karaf/config.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/jmx.acl.org.apache.karaf.config.cfg"
./userdata/config/profile.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/profile.cfg"
./userdata/config/com/eclipsesource/jaxrs/connector.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/com.eclipsesource.jaxrs.connector.cfg"
./userdata/config/com/eclipsesource/jaxrs/swagger/config.config:felix.fileinstall.filename="file:/Users/dottedmag/w/home-automation/openhab/userdata/etc/com.eclipsesource.jaxrs.swagger.config.cfg"
./userdata/tmp/instances/instance.properties:item.0.loc = /Users/dottedmag/w/home-automation/openhab/userdata
```
Note that majority of these are keys `felix.fileinstall.dir` and `felix.fileinstall.filename` — can these be fixed _en masse_? There are few other absolute paths:
```
% grep -r /Users/dottedmag . | grep -v logs| grep -v felix.fileinstall
Binary file ./userdata/cache/org.eclipse.osgi/framework.info.96 matches
./userdata/config/org/ops4j/pax/web.config:org.ops4j.pax.web.config.file="/Users/dottedmag/w/home-automation/openhab/runtime/etc/jetty.xml"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.defaultRepositories="file:/Users/dottedmag/w/home-automation/openhab/runtime/system@id\=system.repository@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar@id\=kar.repository@multi@snapshots,\ file:/Users/dottedmag/w/home-automation/openhab/userdata/system@id\=child.system.repository@snapshots"
./userdata/config/org/ops4j/pax/url/mvn.config:org.ops4j.pax.url.mvn.localRepository="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/mvn"
./userdata/config/org/apache/karaf/kar.config:karStorage="/Users/dottedmag/w/home-automation/openhab/userdata/tmp/kar"
./userdata/config/org/apache/karaf/shell.config:hostKey="/Users/dottedmag/w/home-automation/openhab/userdata/etc/host.key"
./userdata/tmp/instances/instance.properties:item.0.loc = /Users/dottedmag/w/home-automation/openhab/userdata
```
To fix it you have to manually update these paths in your userdata.
SHUred
(SHUred)
June 28, 2022, 5:07pm
4
Im not a professional user but im 100% sure that i only use the openhab/openhab:x-alpine
images for a long time now
I temporarily fixed my system by rolling back to
openhab/openhab:3.2.0-alpine
image
Restored my mounted volumes via a backup tool
Restarted my services and everything is running fine now again.
This tells me that my “old restored data” from 3 days ago is running fine on alpine image
If this is helpful for you i could test to go back to openhab/openhab:3.3.0-alpine
and provide you the logs or something
If everything runs fine the error may be on my side (despite the fact that i did not touch anything)
wborn
(Wouter Born)
June 29, 2022, 6:07am
5
Do find any results when you search for that path on your userdata, e.g. by executing the following command in the container?
grep -R '/usr/share/openhab/addons' /openhab/userdata
1 Like
SHUred
(SHUred)
June 29, 2022, 2:57pm
6
bash-5.1# grep -R '/usr/share/openhab/addons' /openhab/userdata
/openhab/userdata/logs/openhab.log:2022-06-28 18:19:49.991 [WARN ] [org.apache.felix.fileinstall ] - /usr/share/openhab/addons does not exist, please create it.
/openhab/userdata/logs/openhab.log:2022-06-28 18:19:50.033 [WARN ] [org.apache.felix.fileinstall ] - Root path does not exist: /usr/share/openhab/addons
/openhab/userdata/backup/userdata-2022-06-28T16-58-50.tar:2022-06-28 16:51:39.030 [WARN ] [org.apache.felix.fileinstall ] - /usr/share/openhab/addons does not exist, please create it.
/openhab/userdata/backup/userdata-2022-06-28T16-58-50.tar:2022-06-28 16:51:39.118 [WARN ] [org.apache.felix.fileinstall ] - Root path does not exist: /usr/share/openhab/addons
/openhab/userdata/backup/userdata-2022-06-28T16-58-50.tar:felix.fileinstall.dir="/usr/share/openhab/addons"
/openhab/userdata/backup/userdata-2022-06-28T02-02-00.tar:2022-06-22 20:58:37.985 [WARN ] [org.apache.felix.fileinstall ] - /usr/share/openhab/addons does not exist, please create it.
/openhab/userdata/backup/userdata-2022-06-28T02-02-00.tar:2022-06-22 20:58:38.027 [WARN ] [org.apache.felix.fileinstall ] - Root path does not exist: /usr/share/openhab/addons
/openhab/userdata/backup/userdata-2022-06-28T02-02-00.tar:felix.fileinstall.dir="/usr/share/openhab/addons"
/openhab/userdata/config/org/apache/felix/fileinstall/cf1176bd-fd71-4575-9230-363630657842.config:felix.fileinstall.dir="/usr/share/openhab/addons"
Docker-Compose:
version: '2.2'
services:
openhab:
container_name: openhab
#image: "openhab/openhab:latest-alpine"
image: "openhab/openhab:3.2.0-alpine"
restart: unless-stopped
network_mode: host
command: "bash -c 'if [ -e /openhab/restore/restore.zip ]; then echo y |/openhab/runtime/bin/restore /openhab/restore/restore.zip ; fi; exec tini -s ./start.sh server'"
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "/etc/timezone:/etc/timezone:ro"
- "/mnt/tank/docker_volumes/openhab_addons:/openhab/addons"
- "/mnt/tank/docker_volumes/openhab_conf:/openhab/conf"
- "/mnt/tank/docker_volumes/openhab_userdata:/openhab/userdata"
- "/mnt/tank/docker_volumes/openhab_restore:/openhab/restore"
- "/mnt/tank/docker_volumes/openhab_backup:/openhab/backup"
wborn
(Wouter Born)
June 29, 2022, 4:36pm
7
It will probably stop complaining if you update this line to:
felix.fileinstall.dir="/openhab/addons"
2 Likes
SHUred
(SHUred)
June 29, 2022, 5:26pm
8
Seems like this was the solution.
Thanks a lot for helping me and for your awesome work in general!
1 Like
wborn
(Wouter Born)
June 29, 2022, 5:36pm
9
Great! This is actually the same issue as the very first issue I ran into myself with openHAB. I ran OH by extracting the .zip, stopped it and renamed the dir where everything was extracted… restarted openHAB and everything stopped working.
1 Like
Cplant
(Cplant)
September 12, 2023, 8:46pm
10
Have I mentioned that this forum is just really really (!) helpful?
I upgraded from 3.4.4 on docker to 4.0.3 on docker and ran into exactly this problem. Your comment above helped me fixing it.
1 Like