Not able to start a new installation of opernHAB on Synology DSM 6.2 with docker and portainer

  • Platform information:
    • Hardware: Synology DS720+
    • OS: DSM 6.2
    • openHAB version: latest

Hi, just try to create a new installation of openHAB on my Synology. After starting I get the log with the error entry

  • exec gosu openhab tini -s ./start.sh server
    [FATAL tini (22)] exec ./start.sh failed: No such file or directory

Hi Holger,

welcome to the community. I am afraid this level of information is not sufficient to really help you. My bet is that there is an issue with the directory mapping or user rights in the docker. if you could send further information or even better screenshots of your docker setup of openHAB the community could better help.

I am running openHAB in a docker on Synology as well and could e.g. compare.

Hi Jan, thanks for your support. Honestly I did not find a function to upload pictures or the log file. I put everything now attached in a pdf. Hope this helps

BR Holger

openhab.pdf (283 KB)

Hi Holger, i see you compile your Docker yourself. I am using Docker for it. Anyway, my best bet here is that you have a problem with the access rights to folders. Maybe your working directory /opt/openhab does not have the sufficient permission and openhab cannot write to it This is where the error might come from. Note that the USER_ID is called 9001. The best is you enable access read/write for “Everyone” to check if this works. This also counts for the mounted addons, conf, userdata locations. Make sure the permissions are granted, start with Everyone read / write. The mapping seems to be ok.

On a separate note you should consider to change the language to de_DE.UTF-8 ( LC_ALL, LANG, LANGUAGE ) and add a timezone Name: TZ value: Europe/Berlin so you are not struggling with language and time issues once the instance is up and running.

I hope this sorts your issue.

now it starts but the error is still in the log:

transform' ']'
+ initialize_volume /openhab/userdata /openhab/dist/userdata
+ volume=/openhab/userdata
+ source=/openhab/dist/userdata
++ ls -A /openhab/userdata
+ '[' -z 'etc
logs
tmp' ']'
++ cmp /openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties
+ '[' '!' -z ']'
+ chown -R openhab:openhab /openhab
+ sync
+ '[' -d /etc/cont-init.d ']'
+ sync
+ '[' false == false ']'
++ IFS=' '
++ echo gosu openhab tini -s ./start.sh
+ '[' 'gosu openhab tini -s ./start.sh' == 'gosu openhab tini -s ./start.sh' ']'
+ command=($@ server)
+ exec gosu openhab tini -s ./start.sh server
[FATAL tini (23)] exec ./start.sh failed: No such file or directory

also the network “iob_public” is not setup.

what container details are you using:
CMD → gosu openhab tini -s ./start.sh
ENTRYPOINT → entrypoint

That is automatically defined in my docker buildup in the docker app on Synology…

I have set the network to “same as host”. Different network does not work with me.

What happens if you leave CMD and ENTRYPOINT blank? will it use default?

EDIT: if you look into your latest log file and compare it to your first, there is a difference in the part “+ initialize_volume”. With the first log, it was pointed to /openhab/conf ( which is the same with me ), in the latest this changed to /openhab/userdata. Did you eventually mixed up the volume mappings with your second try?

Is USER_ID defined to match the ownership of your host volume? I couldn’t see it in your environment variables.

I think that @joh is right. If you ssh your diskstation you can figure out your ids by typing in the command “id”. I dont know how much your into docker but I very appreciate the docker compose. This is how I use it (my docker compose file):

version: '2.3'
services:
  
  openhab:
    image: "openhab/openhab:3.1.0.M2"
    container_name: openhab
    hostname: openhab
    restart: always
    networks:
      macvlan:
        ipv4_address: 192.168.178.5
    privileged: true
    volumes:
      - "/volume1/docker/openhab/addons:/openhab/addons"
      - "/volume1/docker/openhab/conf:/openhab/conf"
      - "/volume1/docker/openhab/userdata:/openhab/userdata"
    environment:
      USER_ID: "1026"
      GROUP_ID: "100"
      OPENHAB_HTTP_PORT: "8080"
      OPENHAB_HTTPS_PORT: "8443"
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin"
      LC_ALL: "de_DE.UTF-8"
      LANG: "de_DE.UTF-8"
      LANGUAGE: "de_DE.UTF-8"
      
  logviewer:
      image: "welteki/frontail-openhab:latest"
      container_name: logviewer
      network_mode: host
      restart: always
      volumes:
          - "/volume1/docker/openhab/userdata/logs:/var/log/openhab:ro"
      ports:
        - "9001:9001"
networks:
  macvlan:
    external: true

If you safe this as a file “docker-compose.yml”, you just need to move to the folder with the yml file within the console and run “docker-compose up -d”

Hi, I used my old Synology DS713 and run a pure docker installation - here it works. My new one where I have the issue is using portainer. I don’t know whether the issues is somehow caused by that. Are there any other people in the community using portainer for openHAB?

Here is a snipping from my portainer conf:


You schould put this information, or most of them like in my docker-compose in the portainer environment fields.

openHAB is up and running but still got the same error