openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
818 stars 251 forks source link

OH2 > OH3 update: ZRAM error #1229

Closed eikowagenknecht closed 3 years ago

eikowagenknecht commented 3 years ago

Trying to update OH2 to OH3 fails with the following message (debug log):

+ choice2='42 | Upgrade to openHAB 3'
+ '[' 0 -eq 1 ']'
+ '[' 1 -eq 255 ']'
+ wait_for_apt_to_finish_update
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-11-14_14:10:05_CET [openHABian] Updating Linux package information... '
2020-11-14_14:10:05_CET [openHABian] Updating Linux package information... + [[ -z 8318 ]]
+ tail --pid=8318 -f /dev/null
+ echo OK
OK
+ case "$choice2" in
+ migrate_installation openHAB3 testing
+ local 'failText=is already installed on your system !\n\nCanceling migration, returning to menu.'
+ local frontailService=/etc/systemd/system/frontail.service
+ local 'amandaConfigs=/etc/amanda/openhab-*/disklist'
+ local ztab=/etc/ztab
+ local serviceDir=/etc/systemd/system
+ local 'mountUnits=/etc/systemd/system/srv-openhab*'
+ local from
+ local to
+ local distro
+ local javaVersion
+ [[ -z 1 ]]
++ timestamp
++ date +%F_%T_%Z
+ echo -n '2020-11-14_14:10:05_CET [openHABian] Preparing openHAB installation... '
2020-11-14_14:10:05_CET [openHABian] Preparing openHAB installation... + [[ openHAB3 == \o\p\e\n\H\A\B\3 ]]
+ openhab3_is_installed
++ dpkg -s openhab
++ grep Status
++ cut '-d ' -f2
+ [[ '' == \i\n\s\t\a\l\l ]]
+ return 1
+ from=openhab2
+ to=openhab
+ distro=testing
++ java -version
++ awk -F '"' '/version/ {print $2}'
++ sed -e 's/_.*//g; s/^1\.//g; s/\..*//g; s/-.*//g;'
+ javaVersion=8
+ [[ '' != \d\i\s\a\b\l\e ]]
+ cond_redirect systemctl stop zram-config.service zramsync.service
+ [[ -n '' ]]
+ echo -e '\n\033[90;01m$ systemctl stop zram-config.service zramsync.service \033[39;49;00m'

$ systemctl stop zram-config.service zramsync.service
+ systemctl stop zram-config.service zramsync.service
Failed to stop zram-config.service: Unit zram-config.service not loaded.
Failed to stop zramsync.service: Unit zramsync.service not loaded.
+ return 5
+ echo 'FAILED (stop ZRAM)'
FAILED (stop ZRAM)
+ return 1
+ '[' 1 -ne 0 ']'
+ whiptail --msgbox 'There was an error or interruption during the execution of:\n  "40 | openHAB related"\n\nPlease try again. If the error persists, please read /opt/openhabian/docs/openhabian-DEBUG.md or https://github.com/openhab/openhabian/blob/master/docs/openhabian-DEBUG.md how to proceed.' 14 80

I use a standard openhabian installation. The message suggeste that ZRAM needs to be enabled. I found this post (https://community.openhab.org/t/zram-status/80996) explaining that this has been made default 2020/05, probably my installation is a little bit older.

After Installing ZRAM from the menu options this error is fixed.

I'm still opening an issue for this because the error message should really be more self explanatory. Without activating debug level logging I would not have been able to find the source of this.

mstormi commented 3 years ago

Fixed in 56aafad5cc4c7d521a9c0e1f8f61c09945d6bcac