Endless loop after restored backup

Hello,

after restoring a backup, my openHAB 3.2 in a docker container on a Synology DS218+ ( 6.2.4-25556 Update 6) is stuck in an endless loop when trying to start. No openhab.log is generated. The docker console shows:

2022-06-25 21:49:03	stderr	Error occurred shutting down framework: java.lang.NumberFormatException: null
2022-06-25 21:49:03	stderr	null
2022-06-25 21:49:02	stdout	Launching the openHAB runtime...
2022-06-25 21:49:02	stderr	+ exec gosu openhab tini -s ./start.sh server
2022-06-25 21:49:02	stderr	+ command=($@ server)
2022-06-25 21:49:02	stderr	+ '[' 'gosu openhab tini -s ./start.sh' == 'gosu openhab tini -s ./start.sh' ']'
2022-06-25 21:49:02	stderr	++ echo gosu openhab tini -s ./start.sh
2022-06-25 21:49:02	stderr	++ IFS=' '
2022-06-25 21:49:02	stderr	+ '[' false == false ']'
2022-06-25 21:49:02	stderr	+ sync
2022-06-25 21:49:02	stderr	+ '[' -d /etc/cont-init.d ']'
2022-06-25 21:49:02	stderr	+ sync
2022-06-25 21:49:02	stderr	+ chown -R openhab:openhab /openhab
2022-06-25 21:49:02	stderr	+ '[' '!' -z ']'
2022-06-25 21:49:02	stderr	cmp: /openhab/userdata/etc/version.properties: No such file or directory
2022-06-25 21:49:02	stderr	++ cmp /openhab/userdata/etc/version.properties /openhab/dist/userdata/etc/version.properties
2022-06-25 21:49:02	stderr	tmp' ']'
2022-06-25 21:49:02	stderr	secrets
2022-06-25 21:49:02	stderr	persistence
2022-06-25 21:49:02	stderr	logs
2022-06-25 21:49:02	stderr	kar
2022-06-25 21:49:02	stderr	jsondb
2022-06-25 21:49:02	stderr	icalendar_calendar_a107c42237.ical
2022-06-25 21:49:02	stderr	etc
2022-06-25 21:49:02	stderr	config
2022-06-25 21:49:02	stderr	+ '[' -z 'cache
2022-06-25 21:49:02	stderr	++ ls -A /openhab/userdata
2022-06-25 21:49:02	stderr	+ source=/openhab/dist/userdata
2022-06-25 21:49:02	stderr	+ volume=/openhab/userdata
2022-06-25 21:49:02	stderr	+ initialize_volume /openhab/userdata /openhab/dist/userdata
2022-06-25 21:49:02	stderr	transform' ']'
2022-06-25 21:49:02	stderr	things
2022-06-25 21:49:02	stderr	sounds
2022-06-25 21:49:02	stderr	sitemaps
2022-06-25 21:49:02	stderr	services
2022-06-25 21:49:02	stderr	scripts
2022-06-25 21:49:02	stderr	rules
2022-06-25 21:49:02	stderr	persistence
2022-06-25 21:49:02	stderr	items
2022-06-25 21:49:02	stderr	icons
2022-06-25 21:49:02	stderr	html
2022-06-25 21:49:02	stderr	+ '[' -z 'automation
2022-06-25 21:49:02	stderr	++ ls -A /openhab/conf
2022-06-25 21:49:02	stderr	+ source=/openhab/dist/conf
2022-06-25 21:49:02	stderr	+ volume=/openhab/conf
2022-06-25 21:49:02	stderr	+ initialize_volume /openhab/conf /openhab/dist/conf
2022-06-25 21:49:02	stderr	+ id -u openhab
2022-06-25 21:49:02	stdout	Starting with openhab user id: 9001 and group id: 9001
2022-06-25 21:49:02	stderr	+ echo 'Starting with openhab user id: 9001 and group id: 9001'
2022-06-25 21:49:02	stderr	+ NEW_GROUP_ID=9001
2022-06-25 21:49:02	stderr	+ NEW_USER_ID=9001
2022-06-25 21:49:02	stderr	+ rm -f /openhab/userdata/tmp/instances/instance.properties
2022-06-25 21:49:02	stderr	+ rm -f /openhab/runtime/instances/instance.properties
2022-06-25 21:49:02	stderr	+ '[' limited = unlimited ']'
2022-06-25 21:49:02	stderr	'
2022-06-25 21:49:02	stderr	+ IFS='
2022-06-25 21:48:00	stderr	at org.apache.karaf.main.Main.main(Main.java:197)
2022-06-25 21:48:00	stderr	at org.apache.karaf.main.Main.updateInstancePidAfterShutdown(Main.java:232)
2022-06-25 21:48:00	stderr	at org.apache.karaf.main.ConfigProperties.<init>(ConfigProperties.java:251)
2022-06-25 21:48:00	stderr	at java.base/java.lang.Integer.parseInt(Integer.java:770)
2022-06-25 21:48:00	stderr	at java.base/java.lang.Integer.parseInt(Integer.java:614)
2022-06-25 21:48:00	stderr	java.lang.NumberFormatException: null
2022-06-25 21:48:00	stderr	Error occurred shutting down framework: java.lang.NumberFormatException: null
2022-06-25 21:48:00	stderr	null
2022-06-25 21:47:59	stdout	Launching the openHAB runtime...

Before the restore it worked very stable. I would appreciate any idea how to resolve it. Cache and tmp folders are empty.
Thank you

This error suggests that some of your user data is either missing or has been restored to the wrong location.

Uninstall & install again your other addons and Bindings.
I have faced the same issue but after two days of trial and error found this workaround.

If Pi us Upgraded then additional steps :

  1. Set the password for PI user
  2. Compare and add the same groups for Pi user and Openhabian user

Thank you @sujitrp but the endless loop doesn’t allow to (un)install addons/Bindings. The UI is not started. OH is installed in a Docker on a Synology NAS, no PI.

Thank you @wborn, unfortunatelly there is no

/openhab/userdata/etc/version.properties

in the backups. However, your suggestion was very beneficial. Inspired by this post I copied users.properties to version.properties and OH is revived :grinning:. I see now in the openhab.log many errors related to Philips Hue and MQTT Broker but this another story.

Is the missing version.properties a potential bug in the backup script?
edit: I just triggered another backup and version.properties is not stored.

You wouldn’t want to store/restore version.properties because that file is how OH knows what version it is. If you restored an old backup, let’s say a 3.0 release backup on a new instance of OH, let’s say 3.3 R7, then after the restore the 3.3 R7 OH will think it’s really running 3.0 and all sorts of havoc will occur.

Thanks Rich!