Official Docker Image Won't Launch Openhab in "Demo mode"

Hello, I’m trying to just get the OH2 Docker image working in some form or fashion, but I can’t access the UI at all. I’m working on a Windows 10 host machine, if that makes a difference.

To start off with, I just want the easiest path to getting OH running, so I’m trying to get the “demo mode” running, and then I’ll work up from there. I’ve pulled the image and now I’m running the following Docker command, just as the documentation provides it:

docker run --name openhab --net=host openhab/openhab:2.3.0-amd64-debian

When I do this, I get the following output in the console:

++ test -t 0
++ echo false
+ interactive=false
+ set -euo pipefail
+ IFS='
        '
+ '[' limited = unlimited ']'
+ rm -f /openhab/runtime/instances/instance.properties
+ rm -f /openhab/userdata/tmp/instances/instance.properties
+ NEW_USER_ID=9001
+ NEW_GROUP_ID=9001
+ echo 'Starting with openhab user id: 9001 and group id: 9001'
+ id -u openhab
Starting with openhab user id: 9001 and group id: 9001
+ echo 'Create group openhab with id 9001'
+ groupadd -g 9001 openhab
Create group openhab with id 9001
+ echo 'Create user openhab with id 9001'
+ adduser -u 9001 --disabled-password --gecos '' --home /openhab --gid 9001 openhab
Create user openhab with id 9001
Warning: The home dir /openhab you specified already exists.
Adding user `openhab' ...
Adding new user `openhab' (9001) with group `openhab' ...
The home directory `/openhab' already exists.  Not copying from `/etc/skel'.
adduser: Warning: The home directory `/openhab' does not belong to the user you are currently creating.
+ groupadd -g 14 uucp2
+ groupadd -g 16 dialout2
+ groupadd -g 18 dialout3
+ groupadd -g 32 uucp3
+ groupadd -g 997 gpio
+ adduser openhab dialout
Adding user `openhab' to group `dialout' ...
Adding user openhab to group dialout
Done.
+ adduser openhab uucp
Adding user `openhab' to group `uucp' ...
Adding user openhab to group uucp
Done.
+ adduser openhab uucp2
Adding user `openhab' to group `uucp2' ...
Adding user openhab to group uucp2
Done.
+ adduser openhab dialout2
Adding user `openhab' to group `dialout2' ...
Adding user openhab to group dialout2
Done.
+ adduser openhab dialout3
Adding user `openhab' to group `dialout3' ...
Adding user openhab to group dialout3
Done.
+ adduser openhab uucp3
Adding user `openhab' to group `uucp3' ...
Adding user openhab to group uucp3
Done.
+ adduser openhab gpio
Adding user `openhab' to group `gpio' ...
Adding user openhab to group gpio
Done.
+ case ${OPENHAB_VERSION} in
++ ls -A /openhab/userdata
+ '[' -z 'etc
logs
tmp' ']'
++ cmp /openhab/userdata/etc/version.properties /openhab/userdata.dist/etc/version.properties
+ '[' '!' -z ']'
++ ls -A /openhab/conf
+ '[' -z 'html
icons
items
persistence
rules
scripts
services
sitemaps
sounds
things
transform' ']'
+ chown -R openhab:openhab /openhab
+ '[' false == false ']'
++ IFS=' '
++ echo gosu openhab ./start.sh
+ '[' 'gosu openhab ./start.sh' == 'gosu openhab ./start.sh' ']'
+ command=($@ server)
+ exec gosu openhab ./start.sh server
Launching the openHAB runtime...

Notice how it gets stuck at “Launching the openHAB runtime…”

The contents of the openhab.log file is:

2018-08-31 16:29:47.180 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 10.0.75.2
2018-08-31 16:29:47.466 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.65.3:8080
2018-08-31 16:29:47.467 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.65.3:8443
2018-08-31 16:29:51.830 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007

So, it appears to think it’s started the dashboard, but I tried hitting it in my browser, both at localhost:8080 and http://192.168.65.3:8080, but neither one works.

Any ideas what I’m doing wrong?

Nothing? How do others get the Docker image to work?

I’m running a docker image on linux and had some problems with startup too.

With fresh restarts I got further: Clear userdata (empty) and “docker rm openhab”.

I just started today and had the exact same issue. I noticed the first log entry:

2018-08-31 16:29:47.180 [WARN ] [g.eclipse.smarthome.core.net.NetUtil] - Found multiple local interfaces - ignoring 10.0.75.2

It turns out it’s not really ignoring the host address. Try using https://10.0.75.2:8443 and then accept the certificate error. This worked for me.

I did eventually get it working by running the image on the RPi2, instead of my Windows 10 machine. A shame, because I wanted to run a development environment on my laptop before pushing the image to the RPi2, which is what’s serving as my production environment.

I never figured out the root of the problem, though.