[Docker] Update from 4.2.1 to a higher version crashed

Dear Community,

I need help. I am using OpenHAB in a Docker Environment (Portainer) since around 5 years. I had no update issues until now.

I want to upgrade from version 4.2.1 to a higher version. All updates to a higher version (e. g. 4.2.3, 4.3.4) crash with the following message:

+ IFS=',
	',
++ find /usr/lib/jvm -mindepth 1 -maxdepth 1 -type d,
+ export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64,
+ JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64,
+ '[' limited = unlimited ']',
+ capsh --print,
+ grep -E Current:.+,cap_net_admin,cap_net_raw,.+,
+ rm -f '/var/lock/LCK..*',
+ 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',
Starting with openhab user id: 9001 and group id: 9001,
+ id -u openhab,
++ getent group 9001,
+ '[' -z '' ']',
+ 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,
adduser: Warning: The home dir /openhab you specified already exists.,
Adding user `openhab' ...,
Adding new user `openhab' (9001) with group `openhab (9001)' ...,
adduser: The home directory `/openhab' already exists.  Not touching this directory.,
adduser: Warning: The home directory `/openhab' does not belong to the user you are currently creating.,
Adding new user `openhab' to supplemental / extra groups `users' ...,
Adding user `openhab' to group `users' ...,
+ groupadd -g 11 audio2,
+ groupadd -g 14 uucp2,
+ groupadd -g 16 dialout2,
+ groupadd -g 17 audio3,
+ groupadd -g 18 dialout3,
+ groupadd -g 32 uucp3,
+ groupadd -g 63 audio4,
+ groupadd -g 490 dialout4,
+ groupadd -g 492 audio5,
+ groupadd -g 997 gpio,
+ adduser openhab audio,
Adding user `openhab' to group `audio' ...,
Done.,
+ adduser openhab audio2,
Adding user `openhab' to group `audio2' ...,
Done.,
+ adduser openhab audio3,
Adding user `openhab' to group `audio3' ...,
Done.,
+ adduser openhab audio4,
Adding user `openhab' to group `audio4' ...,
Done.,
+ adduser openhab audio5,
Adding user `openhab' to group `audio5' ...,
Done.,
+ adduser openhab dialout,
Adding user `openhab' to group `dialout' ...,
Done.,
+ adduser openhab dialout2,
Adding user `openhab' to group `dialout2' ...,
Done.,
+ adduser openhab dialout3,
Adding user `openhab' to group `dialout3' ...,
Done.,
+ adduser openhab dialout4,
Adding user `openhab' to group `dialout4' ...,
Done.,
+ adduser openhab gpio,
Adding user `openhab' to group `gpio' ...,
Done.,
+ adduser openhab uucp,
Adding user `openhab' to group `uucp' ...,
Done.,
+ adduser openhab uucp2,
Adding user `openhab' to group `uucp2' ...,
Done.,
+ adduser openhab uucp3,
Adding user `openhab' to group `uucp3' ...,
Done.,
+ initialize_volume /openhab/conf /openhab/dist/conf,
+ volume=/openhab/conf,
+ source=/openhab/dist/conf,
++ ls -A /openhab/conf,
+ '[' -z 'automation,
html,
icons,
ipcamera.sh,
items,
Manuelle_Arbeiten_nach_Neuinstallation.txt,
misc,
openhablogs.sh,
persistence,
rsync.sh,
rules,
scripts,
services,
sitemaps,
sounds,
things,
transform' ']',
+ initialize_volume /openhab/userdata /openhab/dist/userdata,
+ volume=/openhab/userdata,
+ source=/openhab/dist/userdata,
++ ls -A /openhab/userdata,
+ '[' -z 'backup,
config,
etc,
icalendar_calendar_b7366b018a.ical,
icalendar_calendar_ddd503f2d8.ical,
ipcamera,
jsondb,
kar,
logs,
miio,
netatmo,
openhabcloud,
persistence,
secrets,
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,
Launching the openHAB runtime...,
./runtime/bin/karaf: 247: [: Illegal number: ,
./runtime/bin/karaf: 247: [: Illegal number: ,
./runtime/bin/karaf: 162: [: Illegal number: ,
./runtime/bin/karaf: 97: [: Illegal number: ,
./runtime/bin/karaf: 305: [: Illegal number: ,
-Djava.endorsed.dirs=/usr/lib/jvm/java-17-openjdk-amd64/jre/lib/endorsed:/usr/lib/jvm/java-17-openjdk-amd64/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.,
+ IFS=',
	',
++ find /usr/lib/jvm -mindepth 1 -maxdepth 1 -type d,

Are there any ideas what todo?

Best
Tino

Share your docker compose ?

Attached my Docker Configuration:



I tried to install a clean docker with new configuration. The same error appears.

Create a new folder and point at it and start fresh. If it starts then cp the contents of the old to the new.

Hi Pedro,
it also crashed with the same error.
Created completly new empty volumes for userdata, conf, addons.

Docker Compose:

{
    "AppArmorProfile": "",
    "Args": [
        "./start_debug.sh"
    ],
    "Config": {
        "AttachStderr": false,
        "AttachStdin": false,
        "AttachStdout": false,
        "Cmd": [
            "./start_debug.sh"
        ],
        "Domainname": "",
        "Entrypoint": [
            "/entrypoint"
        ],
        "Env": [
            "GROUP_ID=9001",
            "USER_ID=9001",
            "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
            "CRYPTO_POLICY=limited",
            "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=8080",
            "OPENHAB_HTTPS_PORT=8443",
            "OPENHAB_LOGDIR=/openhab/userdata/logs",
            "OPENHAB_USERDATA=/openhab/userdata",
            "EXTRA_JAVA_OPTS=",
            "EXTRA_SHELL_OPTS="
        ],
        "ExposedPorts": {
            "5007/tcp": {},
            "54321/tcp": {},
            "8000/tcp": {},
            "8080/tcp": {},
            "8101/tcp": {},
            "8443/tcp": {}
        },
        "Healthcheck": {
            "Interval": 300000000000,
            "Retries": 3,
            "Test": [
                "CMD-SHELL",
                "curl -f http://localhost:${OPENHAB_HTTP_PORT}/ || exit 1"
            ],
            "Timeout": 5000000000
        },
        "Hostname": "openhab",
        "Image": "openhab/openhab:4.3.4",
        "Labels": {
            "org.opencontainers.image.authors": "openHAB <info@openhabfoundation.org>",
            "org.opencontainers.image.created": "2025-03-30T18:21:50Z",
            "org.opencontainers.image.description": "An open source, technology agnostic home automation platform",
            "org.opencontainers.image.documentation": "https://www.openhab.org/docs/installation/docker.html",
            "org.opencontainers.image.licenses": "EPL-2.0",
            "org.opencontainers.image.revision": "39ed2fbe4d6aa4e84b0d7d7cbdbf5dd19fa988fd",
            "org.opencontainers.image.source": "https://github.com/openhab/openhab-docker.git",
            "org.opencontainers.image.title": "openHAB",
            "org.opencontainers.image.url": "https://www.openhab.org/",
            "org.opencontainers.image.vendor": "openHAB Foundation e.V.",
            "org.opencontainers.image.version": "4.3.4"
        },
        "OnBuild": null,
        "OpenStdin": false,
        "StdinOnce": false,
        "Tty": false,
        "User": "",
        "Volumes": {
            "/openhab/addons": {},
            "/openhab/conf": {},
            "/openhab/userdata": {}
        },
        "WorkingDir": "/openhab"
    },
    "Created": "2025-04-25T18:58:11.425253063Z",
    "Driver": "overlay2",
    "ExecIDs": null,
    "GraphDriver": {
        "Data": {
            "LowerDir": "/var/lib/docker/overlay2/ae86f21364c7b447e9c9541eea6f0ee741fd8fc6d0d97a65205525f3bc8f2f19-init/diff:/var/lib/docker/overlay2/08eb44298de0e04570e298f6db8f6e5843f3bc627a2300f6cde84da7e4855dc0/diff:/var/lib/docker/overlay2/16873c74371b3ee8fbfb5d01cb69bb54f2974e2fed3650c059f2caca243a16fa/diff:/var/lib/docker/overlay2/d84be552c9400aea0d2feba65c87e7d7912503cf80045651c0161586f65caa5e/diff:/var/lib/docker/overlay2/82df0f6968e8d4f4f4d9ed36239d54a2f1744ccd0ed8fc10e8f33518429dfccd/diff:/var/lib/docker/overlay2/06a150ddab1e818eda21e2f63a1d89e9df38f24d8849acdb6502eadb5db2c810/diff:/var/lib/docker/overlay2/7b3c4e459c79b2aa8485c0500a199b51c790bb04d47638e6cdd0dd5964407cd0/diff:/var/lib/docker/overlay2/a15bf1be37dbc444aa4f5db9b0197ef2985d4473f05486ea956d6029c2d82e25/diff:/var/lib/docker/overlay2/631be5da045b5194d2a9debb4f349ea5de8ac607358dd12b1cf9497903014cc6/diff:/var/lib/docker/overlay2/9974f94d0dcc4dc92d3eab640efcaf7e75dcd63671a5a8bf5f22063adb435fb9/diff",
            "MergedDir": "/var/lib/docker/overlay2/ae86f21364c7b447e9c9541eea6f0ee741fd8fc6d0d97a65205525f3bc8f2f19/merged",
            "UpperDir": "/var/lib/docker/overlay2/ae86f21364c7b447e9c9541eea6f0ee741fd8fc6d0d97a65205525f3bc8f2f19/diff",
            "WorkDir": "/var/lib/docker/overlay2/ae86f21364c7b447e9c9541eea6f0ee741fd8fc6d0d97a65205525f3bc8f2f19/work"
        },
        "Name": "overlay2"
    },
    "HostConfig": {
        "AutoRemove": false,
        "Binds": [
            "OpenHAB4_addons:/openhab/addons",
            "OpenHAB4_conf:/openhab/conf",
            "OpenHAB4_userdata:/openhab/userdata"
        ],
        "BlkioDeviceReadBps": null,
        "BlkioDeviceReadIOps": null,
        "BlkioDeviceWriteBps": null,
        "BlkioDeviceWriteIOps": null,
        "BlkioWeight": 0,
        "BlkioWeightDevice": null,
        "CapAdd": null,
        "CapDrop": null,
        "Capabilities": null,
        "Cgroup": "",
        "CgroupParent": "",
        "ConsoleSize": [
            0,
            0
        ],
        "ContainerIDFile": "",
        "CpuCount": 0,
        "CpuPercent": 0,
        "CpuPeriod": 0,
        "CpuQuota": 0,
        "CpuRealtimePeriod": 0,
        "CpuRealtimeRuntime": 0,
        "CpuShares": 0,
        "CpusetCpus": "",
        "CpusetMems": "",
        "DeviceCgroupRules": null,
        "DeviceRequests": null,
        "Devices": [],
        "Dns": [],
        "DnsOptions": [],
        "DnsSearch": [],
        "ExtraHosts": [],
        "GroupAdd": null,
        "IOMaximumBandwidth": 0,
        "IOMaximumIOps": 0,
        "IpcMode": "private",
        "Isolation": "",
        "KernelMemory": 0,
        "KernelMemoryTCP": 0,
        "Links": null,
        "LogConfig": {
            "Config": {
                "max-size": "100m"
            },
            "Type": "local"
        },
        "MaskedPaths": [
            "/proc/asound",
            "/proc/acpi",
            "/proc/kcore",
            "/proc/keys",
            "/proc/latency_stats",
            "/proc/timer_list",
            "/proc/timer_stats",
            "/proc/sched_debug",
            "/proc/scsi",
            "/sys/firmware"
        ],
        "Memory": 4330618880,
        "MemoryReservation": 4330618880,
        "MemorySwap": -1,
        "MemorySwappiness": null,
        "NanoCpus": 4000000000,
        "NetworkMode": "myNetwork",
        "OomKillDisable": false,
        "OomScoreAdj": 0,
        "PidMode": "",
        "PidsLimit": null,
        "PortBindings": {
            "54321/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "54321"
                }
            ],
            "8000/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "8000"
                }
            ],
            "8080/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "8080"
                }
            ],
            "8443/tcp": [
                {
                    "HostIp": "",
                    "HostPort": "8443"
                }
            ]
        },
        "Privileged": false,
        "PublishAllPorts": true,
        "ReadonlyPaths": [
            "/proc/bus",
            "/proc/fs",
            "/proc/irq",
            "/proc/sys",
            "/proc/sysrq-trigger"
        ],
        "ReadonlyRootfs": false,
        "RestartPolicy": {
            "MaximumRetryCount": 0,
            "Name": "no"
        },
        "Runtime": "runc",
        "SecurityOpt": null,
        "ShmSize": 67108864,
        "UTSMode": "",
        "Ulimits": null,
        "UsernsMode": "",
        "VolumeDriver": "",
        "VolumesFrom": null
    },
    "HostnamePath": "/var/lib/docker/containers/d3b97485cd0ac9e7df8a9fe91ade8b142ca69be9902dd843b434e45ecd3bd848/hostname",
    "HostsPath": "/var/lib/docker/containers/d3b97485cd0ac9e7df8a9fe91ade8b142ca69be9902dd843b434e45ecd3bd848/hosts",
    "Id": "d3b97485cd0ac9e7df8a9fe91ade8b142ca69be9902dd843b434e45ecd3bd848",
    "Image": "sha256:40113d9f4ce0f35aeaa3221e5fc86cbf7ce78a29ea22b5283e13913cb2c9a0d7",
    "LogPath": "",
    "MountLabel": "",
    "Mounts": [
        {
            "Destination": "/openhab/addons",
            "Driver": "local",
            "Mode": "z",
            "Name": "OpenHAB4_addons",
            "Propagation": "",
            "RW": true,
            "Source": "/var/lib/docker/volumes/OpenHAB4_addons/_data",
            "Type": "volume"
        },
        {
            "Destination": "/openhab/conf",
            "Driver": "local",
            "Mode": "z",
            "Name": "OpenHAB4_conf",
            "Propagation": "",
            "RW": true,
            "Source": "/var/lib/docker/volumes/OpenHAB4_conf/_data",
            "Type": "volume"
        },
        {
            "Destination": "/openhab/userdata",
            "Driver": "local",
            "Mode": "z",
            "Name": "OpenHAB4_userdata",
            "Propagation": "",
            "RW": true,
            "Source": "/var/lib/docker/volumes/OpenHAB4_userdata/_data",
            "Type": "volume"
        }
    ],
    "Name": "/OpenHAB_4.3.4",
    "NetworkSettings": {
        "Bridge": "",
        "EndpointID": "",
        "Gateway": "",
        "GlobalIPv6Address": "",
        "GlobalIPv6PrefixLen": 0,
        "HairpinMode": false,
        "IPAddress": "",
        "IPPrefixLen": 0,
        "IPv6Gateway": "",
        "LinkLocalIPv6Address": "",
        "LinkLocalIPv6PrefixLen": 0,
        "MacAddress": "",
        "Networks": {
            "myNetwork": {
                "Aliases": [
                    "d3b97485cd0a"
                ],
                "DriverOpts": null,
                "EndpointID": "",
                "Gateway": "",
                "GlobalIPv6Address": "",
                "GlobalIPv6PrefixLen": 0,
                "IPAMConfig": {
                    "IPv4Address": "192.168.0.13"
                },
                "IPAddress": "",
                "IPPrefixLen": 0,
                "IPv6Gateway": "",
                "Links": null,
                "MacAddress": "",
                "NetworkID": "983d15cf0e9cb2d3bf6837ab2a39f7c2b4e6eb8a682e5bb2bd68ab161fb758e5"
            }
        },
        "Ports": {},
        "SandboxID": "cfd4b8e43c547e763627afab7fa87631064c4fdb787aaec68c2573eb619ad2ed",
        "SandboxKey": "/var/run/docker/netns/cfd4b8e43c54",
        "SecondaryIPAddresses": null,
        "SecondaryIPv6Addresses": null
    },
    "Path": "/entrypoint",
    "Platform": "linux",
    "ProcessLabel": "",
    "ResolvConfPath": "/var/lib/docker/containers/d3b97485cd0ac9e7df8a9fe91ade8b142ca69be9902dd843b434e45ecd3bd848/resolv.conf",
    "RestartCount": 0,
    "State": {
        "Dead": false,
        "Error": "",
        "ExitCode": 1,
        "FinishedAt": "2025-04-25T18:58:26.157624186Z",
        "Health": {
            "FailingStreak": 0,
            "Log": [],
            "Status": "unhealthy"
        },
        "OOMKilled": false,
        "Paused": false,
        "Pid": 0,
        "Restarting": false,
        "Running": false,
        "StartedAt": "2025-04-25T18:58:13.426473655Z",
        "Status": "exited"
    }
}

Huh? That’s nothing like the standard compose yml…
Create a new stack in portainer, call it smart home or somesuch and copy the yml off of the docker hub OpenHAB page:
“ Create the following docker-compose.yml for use of local directories”, here:
https://hub.docker.com/r/openhab/openhab/

You’ll be running OpenHAB with docker volumes which is not a good idea but if it works then you’ll know that it’s not an image problem.

Then go with this:
“ Starting with Docker mounting a host directory (for advanced user)”

And replace the mount points with your local host folders instead.

And it should work. I created a new container just now and it starts just fine so you have to troubleshoot your client.

Upgrade to a recent Docker version on your host. If you run recent Docker images they often make syscalls that are not whitelisted by an outdated Docker version causing applications to crash.

You can also disable seccomp with openHAB if you cannot upgrade Docker to workaround this. However that is not recommended because of the security implications.

Its a shame. I cannot update to a recet Docker version on my host. I am using a closed system.

How can I disable seccomp? Then I would try this workaround.

Best
Tino

According to ChatGPT for Portainer:

During Container Creation

  1. Go to Containers → Add container (or “Duplicate/Edit” an existing one).

  2. Scroll down to Advanced container settings.

  3. Go to the Security and Host tab.

  4. In the Security options field, add:

seccomp=unconfined

  1. Finish filling in your container settings and deploy it.