Hi @rlkoshak sir
here is what I done from the beginning, I first run the command:
sudo docker run --name=openhab220snap --net=host --restart=always -v /opt/openhab220/conf:/openhab/conf -v /opt/openhab220/addons:/openhab/addons -v /opt/openhab220/userdata:/openhab/userdata -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -e LC_ALL=zh_CN.UTF-8 -e USER_ID=9001 -e GROUP_ID=9001 -e EXTRA_JAVA_OPTS=-Dosgi.clean=true -t -d openhab/openhab:2.2.0-snapshot-armhf-debian
everything is working so far, the page redirects and I can install binding from paperui, and then I restart the container, works very well without any stucking problem…(I’ve done many times, the problem seems gone)
I also checked the size of the /userdata/cache by running this command sudo du -sch cache/
when each restart
and I get 61M total size all the time( of cuz with -Dosgi.clean=true
enabled, but the cache folder is not empty everytime I restart, it always remains the same 61M size), in this case, the stucking problem seems never happen.
but…
Here is how I can reproduce the “stucking process” at the “Please stand by while UIs are being installed. This can take several minutes.” page…(only for the 2.2 snapshot version, not the 2.1.0 stable docker version, the 2.1 always working btw…)
the different is: this time I manually upload the “openhab-addons-2.2.0-SNAPSHOT.kar” file to the /addons folder first (due to some slow internet connection, I always prepare the “offline” addon file, downloaded from HERE)
and thenl I run the docker command exactly the same as above
the docker openhab booted and redirects to the index page, I still can install binding from paperui(with offline addon files it install much more quicker), and then I restart the docker container immediately, the stucking problem happen…
in this case, no matter how many times I restart the container, the page seems always stucking at that stage unless I manually delete the /cache and /tmp folder, then it redirects to the index page correctly, and give it another restart it will stuck to that “Please stand by” page again…
I don’t know if the .kar file causing this problem, but I did exactly the same process to 2.1.0 stable version, it always working very well…
I didn’t modify the “system.properties.” files if you ask, I think the EXTRA_JAVA_OPTS=-Dosgi.clean=true
tells docker to clean the cache, but I will try to modify this files and get back to you later
I hope sir you can guide me through this, thanks
edit:
I delete the “openhab-addons-2.2.0-SNAPSHOT.kar” file and restart the docker container, this time it redierects to the index page without any problem, lolz… looks like the .kar file causing this problem… sorry about that…(I have to download addons online when I install bindings…sad T_T)
I also doubt that with env variable set to -e EXTRA_JAVA_OPTS=-Dosgi.clean=true
it seems not working at all, docker seems like not perform any cleaning process during restart (both /cache and /tmp folders)
I modify system.properties file, edit karaf.clean.cache=true
is working, the /cache is empty when restart, no stucking page:
I modify system.properties file, edit karaf.clean.cache=true
but keep the .kar file in addons folder, it stucks again after restarting the container…
Shane