openhab / openhab-docker

Repository for building Docker containers for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
209 stars 128 forks source link

JVM crashes in arm64 Debian image on Raspberry Pi 3 #416

Closed s0170071 closed 1 year ago

s0170071 commented 1 year ago

Following the instructions here and here the current docker image fails to start on a RPI3b+

The RPI was set up from scratch with the bullyseye 64 bit lite OS, then I followed the instructions above. 32 bit version gave the same result.

While the helloworld test containter or code-server container started fine, OH did not. The console read:

` pi@raspberrypi:~ $ docker attach pi-openhab-1 Aborted (core dumped) ./runtime/bin/karaf: 247: [: Illegal number: Aborted (core dumped) Aborted (core dumped) ./runtime/bin/karaf: 247: [: Illegal number: ./runtime/bin/karaf: 97: [: Illegal number: ./runtime/bin/karaf: 300: [: Illegal number: -Djava.endorsed.dirs=/usr/lib/jvm/temurin-11-jdk-arm64/jre/lib/endorsed:/usr/lib/jvm/temurin-11-jdk-arm64/lib/endorsed:/openhab/runtime/lib/endorsed is not supported. Endorsed standards and standalone APIs in modular form will be supported via the concept of upgradeable modules. Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.

`

the commands I issued were:

`

install docker

curl -fsSL https://get.docker.com/ -o get-Docker.sh; sudo sh get-Docker.sh; sudo usermod -aG docker $USER newgrp docker

prepare openhab folders

sudo useradd -r -s /sbin/nologin openhab sudo usermod -a -G openhab pi sudo mkdir -p /opt/openhab/{conf,userdata,addons} sudo chown -R openhab:openhab /opt/openhab docker test

test with docker helloWorld executes just fine.

docker run

docker run –name openhab –net=host -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro -v /opt/openhab/conf:/openhab/conf -v /opt/openhab/userdata:/openhab/userdata -v /opt/openhab/addons:/openhab/addons -d -e USER_ID=999 -e GROUP_ID=994 -e OPENHAB_HTTP_PORT=8080 -e OPENHAB_HTTPS_PORT=8444 -e CRYPTO_POLICY=unlimited –restart=always openhab/openhab:3.4.2

`

wborn commented 1 year ago

See also this community thread.