If logs where generated please post these here using code fences:
This is a fresh install (i am using Sensors/IOTstack) . The part of docker-compose.yml with openhab is written above.
After the install, and configuring the user, when i try to add add-ons i get this error message:
This is my first attempt to use openhab with Docker. My former openHAB 2.5 install (RPi4/SSD) is using openHABian. That is running OK.
Hopefully someone has an idea where to look for this issue?
I am sorry, but i was using fence code:
But for some reason this did not worked as intenden.
But the code should be YAML formatted, and it is on my system; the docker-compose install install went without errors.
@rikoshak Yes i think you are right, it must have something to do with user/group rights.
I did not payed attention to this when installing my iotstack… I’l have to look into this. @Bruce_Osborne, I know mosquitto is not part of openhab. I should not have included it in my description. But my IOTstack consist of 12 applications, among which mosquitto.
Thank you both for your help so far.
Regards Bert
Ps, I do not know what is happening with the formatting. I have posted things in the past without this problem… Will check with an other browser.
Ok, started from scratch; removed all containers and images, so a clean docker environment.
Removed old user and group openhab and (re)created new ones, following the openhab docs.
user openhab with UID 9001, group openhab with GID 9001. (also acc. the User and Group Identifiers as shown in the Docker Hub page.)
Btw, i am logged in as user pi. (user openhab is not able to login according to the openhab docs).
sudo useradd -r -s /sbin/nologin openhab
I use this docker run command (not using docker-compose for symplicity, but with host directories for my specific situation):
I checked the user:group settings for the openhab directories, they are openhab:openhab.
Also set the permissions tor the dirs addons, conf and userdata to 777 (recursively)
But it did not solve the issue.
This is my first attempt with Docker for openHAB (my old 2.5 version is made with openHABian). But i have an other RPi4 running with Home Assistant also with the Sensors/IOTstack and with about 15 containers running flawlessly.
I started home automation with openhab 1.8, but i always had difficulties (not being a programmer) with the Automations. That’s why i switched this year to Home Assistant, which is for non-programmers much easier. But i always liked openhab and with the introduction of version 3, i thought lets give it another try. According to the presentation this december it should be easier to program using the GUI…
But unfortunately with my first attempt i run into this… Hopefully you can help me…
Regards, Bert
pi@oh-241:~ $ id openhab
uid=9001(openhab) gid=9001(openhab) groups=9001(openhab)
As i wrote, i purposely deleted the user and group, and recreated them again with the correct UID/GID.
I followed the staps in Docker | openHAB and opted for Running the container as a Service Managed by Docker.
Btw Java 11 is installed on the host file system:
pi@oh-241:~ $ java -version
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-post-Raspbian-1deb10u2)
OpenJDK Server VM (build 11.0.9.1+1-post-Raspbian-1deb10u2, mixed mode)
(I know, the easiest way to get openhab running is using openHABian. Thats how i run my 2.5 version. But i would like to move to an Intel NUC in the near future, and since i gained a little experience with Home Assistant in docker, i would like to use docker for openhab as well. Also i can use the NUC for far more stuff…)
Ok, i changed tactic. I left the Sensors/IOTstack approach and started with an new sd-card.
Installed Docker and then i followed the steps from the openHAB docs including the /opt/openhab directory for the install volumes.
This is working OK. So there must be something in the Sensors/IOTstack scripts which is necking me. I won’t figure out what is going wrong, instead now i know the docker install of openhab is working, i am making my own IOTstack with all the apps i need.
@rlkoshak Rich, thanks for pointing me to the user/group IDs posibility, but that was not the cause.
I wish you both @rlkoshak and @Bruce_Osborne a fine New Years Eve and hopefully a much better 2021!
Kind regards, Bert
Just curious - what do you have in your Network settings? In my case, many things did not work correctly until I set the default IP address to be that of the host in Network settings. Otherwise, be default, the OH3 Docker container used an internal IP address of 169.254.xxx.xxx.
So, i made a new clena installation from scratch and if i put something in the addon folder nothing is happen, same as befor.
How could i debug this, how to setup a debug for this “watcher” of this folder so i could setup something.
I’m on IOTstack and the only file belongs to openhab is the yml template that generates the docker-compose. So there are no script that block or do someting else in there.
I followed the Docker documentation. Created user, added my to the group, etc. I created the directories and authorized them accordingly as well.
In the karaf console i could list the addon with bundle:list and it gets listed if i remove it from the folder it disappears from the list.
But still no messages in any log if i put it in there or delete it. But it works and appears in the gui.