Migration OH 4.0.4 to OH 4.1.0 on docker - webserver does not start

Just recently upgraded the docker image from registry, reset & restart the container on Synology diskstation. Since then I cannot reach OH anymore.

The update.log looks fine as it finishes with SUCCESS: openHAB updated from 4.0.4 to 4.1.0
openhab.log and events.log stay zero size.

Checking the status of openhab with
$ docker exec -it openhab /openhab/runtime/bin/status
returns Running… seems to be fine

Opening the OH https or http website ends with “refused to connect”
curl -k https:// xx :8444
curl: (7) Failed to connect to 192.168.48.192 port 8444 after 2042 ms: Couldn’t connect to server
or
curl http:// xx :8081
shows the same problem.

Inspecting the docker container
$ docker inspect openhab
indicates the container’s running state, but with failing health check.

Reported environment parameters also look fine:
“Env”: [
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,
“CRYPTO_POLICY=unlimited”,
“EXTRA_JAVA_OPTS=-Duser.timezone=Europe/Berlin”,
“GROUP_ID=9001”,
“KARAF_EXEC=exec”,
“LC_ALL=en_US.UTF-8”,
“LANG=en_US.UTF-8”,
“LANGUAGE=en_US.UTF-8”,
“OPENHAB_BACKUPS=/openhab/userdata/backup”,
“OPENHAB_CONF=/openhab/conf”,
“OPENHAB_HOME=/openhab”,
“OPENHAB_HTTP_PORT=8081”,
“OPENHAB_HTTPS_PORT=8444”,
“OPENHAB_LOGDIR=/openhab/userdata/logs”,
“OPENHAB_USERDATA=/openhab/userdata”,
“USER_ID=9001”,
“JAVA_VERSION=17”,
“JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64”
],

ssh into the docker container, checking the running process by ps -edlaf:
0 S openhab 25 1 0 80 0 - 961839 futex_ 10:49 pts/0 00:00:14 /usr/lib/jvm/java-17-openjdk-amd64/bin/java
-XX:-UsePerfData
-Dopenhab.home=/openhab -Dopenhab.conf=/openhab/conf
-Dopenhab.runtime=/openhab/runtime
-Dopenhab.userdata=/openhab/userdata
-Dopenhab.logdir=/openhab/userdata/logs
-Dfelix.cm.dir=/openhab/userdata/config
-Djava.library.path=/openhab/userdata/tmp/lib
-Djdk.util.zip.disableZip64ExtraFieldValidation=true
-Djetty.host=127.0.0.1
-Djetty.http.compliance=RFC2616
-Dorg.apache.cxf.osgi.http.transport.disable=true
-Dorg.ops4j.pax.web.listening.addresses=127.0.0.1
-Dorg.osgi.service.http.port=8081
-Dorg.osgi.service.http.port.secure=8444
-Djava.awt.headless=true -Dfile.encoding=UTF-8
-Duser.timezone=Europe/Berlin

indicates the expected running OH parameters as given by the container env parameters.

Within the container I could also reproduce the failing health check:
root@openhab:/openhab# curl -f http://localhost:8081
curl: (7) Failed to connect to localhost port 8081: Connection refused

With netstat I could not identify any listeners on the ports 8081 and 8444:
root@openhab:/openhab# netstat -nap
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.11:47117 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:44699 0.0.0.0:* LISTEN -
udp 0 0 127.0.0.11:59212 0.0.0.0:* -
udp 0 0 0.0.0.0:8472 0.0.0.0:* -
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 STREAM CONNECTED 78605677 -
unix 3 STREAM CONNECTED 78603582 -
unix 3 STREAM CONNECTED 78606571 -
unix 3 STREAM CONNECTED 78606572 -
unix 3 STREAM CONNECTED 78603583 -

Thus there seems no exiting listerners be active. Comparing with other docker containers, I would expect the web server sitting on the configured ports.

Any idea what is going wrong with that docker image? I could not find any further logging sources explaining what’s going on.

What about the openhab.log file content ?

The logfiles are unfortunately all empty (0 bytes) and I could not another source of information within the docker container indicating what’s going wrong.
The OH process is running and calling the container’s /openhab/runtime/bin/status or /stop or /start are working.
It looks like the web server isn’t there, could not see any listener.
Tried to move used ports of OH away from jetty (port 8443 according to userdata/etc/jetty.xml) so no conflicts can occur.
Migration from OH 3.x to 4.0.4 happened months ago, now moving to 4.1.0 caused vanished web services.

Why changing ports inside the container at all?

That was my initial setup. Leaving the container at 8080/8443 and mapping them outside to something else since it would conflict with other ports on the hosting Synology.
However when I ssh into the container I wasn´t able to curl the local (inside the container ) website at the local port 8080/8443. Always caught refused connections.
So I assume that OH, or more specific the webserver, does not accept connections. I’ve still no clue where I could inspect logs to see what’s happening at the webserver level.

1 Like

Meanwhile I fixed the OH installation by setting up a brand new OH 4.1 container. Further I copied the old directories /openhab/conf and /openhab/userdata over to the new volumes.
Luckily OH did start again and I didn’t loose my long history of data.
No single clue nor any traces in logs what went wrong.