OpenHab 2.5.12 (Docker) migration to another physical host (Raspi)

Hello,
I am struggling with my OpenHAB 2.5.12 migration running in a Docker container - from Raspberry Pi 3 Plus to Raspberry Pi 4. The OpenHAB container is communicating with a Mosquitto container for MQTT.
Current state:
OpenHAB runs “ok” on the Raspberry Pi 3 Plus, but due to memory limits (only 1 GB RAM) and a notorious startup issue I decided to invest in a Raspberry Pi 4 with 4 GB of memory.
The current startup issue leads to an OpenHAB container boot loop which is settled after 20 to 40 minutes with all webinterfaces being available and rules being processed. It seems that if the Raspberry Pi 3 Plus is cooler, a successful startup process is accelerated.
The logs do not show any clues for me in the moment when the container fails:
openhab.log:

2021-11-13 16:39:08.298 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.1.5:8080
2021-11-13 16:39:08.301 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.1.5:8443
2021-11-13 16:39:54.761 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.

docker logs OpenHAB:

++ 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...
++ 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'
Starting with openhab user id: 9001 and group id: 9001

Future state:
OpenHAB 2.5.12 running on the new Raspberry Pi 4 with identical configuration.
Tasks done:

  • Full backup of the persistent docker folders openhab_addons, openhab_config and openhab_userdata from Raspberry Pi 3 Plus
  • Fresh Raspberry Pi 4 install including docker and updated to the latest versions
  • Creation of identical folder structure on the Raspberry Pi 4 and recursive copy of the three folders from the backup
  • sudo chown -R 9001:9001 openhab_* to have correct permissions set
  • Start of Docker container using docker-compose:
    OpenHAB.yml:
version: '2.2'
# https://hub.docker.com/r/openhab/openhab
# https://www.openhab.org/docs/installation/docker.html
services:
  openhab:
    image: openhab/openhab:2.5.12
    container_name: OpenHAB
    network_mode: host
    volumes:
      - '/etc/localtime:/etc/localtime:ro'
      - '/etc/timezone:/etc/timezone:ro'
      - ./openhab_addons:/openhab/addons
      - ./openhab_conf:/openhab/conf
      - ./openhab_userdata:/openhab/userdata
    environment:
      OPENHAB_HTTP_PORT: '8080'
      OPENHAB_HTTPS_PORT: '8443'
      EXTRA_JAVA_OPTS: '-Duser.timezone=Europe/Berlin'
    restart: always

Observations:
The Raspberry 4 also runs into an OpenHAB container boot loop (like Raspberry Pi 3 Plus). After again 30+ minutes the webinterfaces went online but all my things are missing in the PaperUI. I verified the file org.eclipse.smarthome.core.thing.Thing.json located in Docker/OpenHAB/openhab_userdata/jsondb and to my surprise it is empty. I stopped the OpenHAB container, copied the file a 2nd time and started the container again. Again, after 30+ minutes the webinterfaces show up but the things are missing again. Also, the previously copied .json file (864 KB) is now 0 KB again! It seems that somehow the original file is being discarded and replaced by an empty one after several unsuccessful startups.

What can you suggest to analyze and fix this problem. Currently I am out of ideas.
Thanks in advance!

Athlon

Did you also add a KAR file or update the default configuration so it can download add-ons?

See:

Yes, the file openhab-addons-2.5.12.kar is located in OpenHAB/openhab_addons (fixed another problem of my installation → Only MQTT configurations in .things file not shown anymore in PaperUI - #5 by Athlon)

Update:
After dissecting the org.eclipse.smarthome.core.thing.Thing.json and removing all entries pointing to "network:pingdevice:<ip>": {...} (altogether 48 entries) the config loads fine and quick.
I then added more and more prevously removed entries leading to irregular startup issues again.
In order to have a more stable container boot process, I changed the default value of binding.network:cacheDeviceStateTimeInMS located in /services/network.cfg from 2000 to 10000 ms.

Update 2:
Same issue occurs with a migrated OH 3.1 docker container (slightly more entries possible). Container repeatedly fails due to arping invoked oom-killer.
How can I disable the Network Binding with the container being off?