openhabian: Java installations fails [works after fix]

Hi there and sorry if I am about to make any mistake by reporting this. (Did a search on open issues though). Downloaded openhabian-pi-raspbian-201908050414-gitca0976f-crc6a66b5a1.img.xz -> extracted with keka -> setup wifi in openhab.conf -> etcher’ed to sdcard, powered on raspberry pi 3b and waited. Nothing… patience… ssh’d into and found this:

Attention! The openHABian setup process seems to have failed on your system.
Sorry, this shouldn't happen! Please restart the installation process. Chances
are high setup will succeed on the second try.

In order to find the cause of the problem, have a look at the installation log:
   sudo cat /boot/first-boot.log

Contact the openHAB community forum for help if the problem persists:
https://community.openhab.org/tags/openhabian

sudo cat /boot/first-boot.log

2019-09-06_21:57:19_CEST [openHABian] Starting the openHABian initial setup.
2019-09-06_21:57:19_CEST [openHABian] Storing configuration... OK
2019-09-06_21:57:19_CEST [openHABian] Starting webserver with installation log... OK
2019-09-06_21:57:24_CEST [openHABian] Changing default username and password... SKIPPED
2019-09-06_21:57:24_CEST [openHABian] Setting up Wi-Fi connection... OK
2019-09-06_21:57:25_CEST [openHABian] Ensuring network connectivity... OK
2019-09-06_21:57:36_CEST [openHABian] Waiting for dpkg/apt to get ready... OK
2019-09-06_21:59:40_CEST [openHABian] Updating repositories and upgrading installed packages... OK
2019-09-06_21:59:51_CEST [openHABian] Installing git package... OK
2019-09-06_21:59:59_CEST [openHABian] Cloning myself... OK
2019-09-06_22:00:02_CEST [openHABian] Executing 'openhabian-setup.sh unattended'... 
2019-09-06_22:00:02_CEST [openHABian] Checking for root privileges... OK
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists...
2019-09-06_22:00:08_CEST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2019-09-06_22:00:08_CEST [openHABian] Setting timezone based on IP geolocation... OK (Europe/Berlin)
2019-09-06_22:00:20_CEST [openHABian] Setting locale based on openhabian.conf... OK
2019-09-06_22:01:49_CEST [openHABian] Setting hostname of the base system... OK
2019-09-06_22:01:49_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2019-09-06_22:01:49_CEST [openHABian] Enabling Audio output... OK
2019-09-06_22:01:50_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2019-09-06_22:01:55_CEST [openHABian] Installing additional needed packages... OK
2019-09-06_22:01:57_CEST [openHABian] Installing additional bluetooth packages... OK
2019-09-06_22:02:00_CEST [openHABian] Adding slightly tuned bash config files to system... OK
2019-09-06_22:02:00_CEST [openHABian] Adding slightly tuned vim config file to system... OK
2019-09-06_22:02:00_CEST [openHABian] Downloading and setting up FireMotD... OK 
2019-09-06_22:02:42_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK... 
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
FAILED
2019-09-06_22:02:45_CEST [openHABian] Initial setup exiting with an error!
[22:25:50] openhabian@openhabian:~$ 

Help very much appreciated… though I am afraid they changed something on their website 😦

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 34 (6 by maintainers)

Most upvoted comments

workaround for Rpi:

I have a workaround: 1: when install fails, open /opt/openhabian/functions/java-jre.bash

change the middle line. this will skip the java selection

 # Fetch and copy new JAVA runtime
  cond_redirect wget -nv -O "$jdkTempLocation"/zulu8.tar.gz https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz
  tar -xpzf "$jdkTempLocation"/zulu8.tar.gz -C "${jdkTempLocation}"

2: open /boot/first-boot.bash and comment these 3 lines. this wil prevent the previous file from being overwritten

# echo -n "$(timestamp) [openHABian] Cloning myself... "
# [ -d /opt/openhabian/ ] && rm -rf /opt/openhabian/ # check if we have remnants of a previous installation attempt.
# git clone -b master https://github.com/openhab/openhabian.git /opt/openhabian &>/dev/null

I had to reboot twice, the first time even if completed, openhab did not start. second was fine

Anyone can change the hardlink required.

You need to SSH in to you device … then execute this command… sudo nano /opt/openhabian/functions/java-jre.bash then press Ctrl+w (find) and paste this # Fetch and copy new JAVA runtime then delete the line BELOW this one.

And paste this cond_redirect wget -nv -O "$jdkTempLocation"/zulu8.tar.gz https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz

Then press Ctrl+o (not zero but O… it means save) And then press Ctrl+x to exit

Then execute this command sudo nano /boot/first-boot.bash and find this line (again press Ctrl + w and paste the line) echo -n "$(timestamp) [openHABian] Cloning myself... " You will see this three lines… echo -n "$(timestamp) [openHABian] Cloning myself... " [ -d /opt/openhabian/ ] && rm -rf /opt/openhabian/ # check if we have remnants of a previous installation attempt. git clone -b master https://github.com/openhab/openhabian.git /opt/openhabian &>/dev/null

You need to disable these lines… You could delete them but it is better to put hash tags on the beginning (# ) the lines shoul look likne this

# [ -d /opt/openhabian/ ] && rm -rf /opt/openhabian/ # check if we have remnants of a previous installation attempt.
# git clone -b master https://github.com/openhab/openhabian.git /opt/openhabian &>/dev/null 

And again press Ctrl + o (not zero) and Ctrl + x then execute a reboot sudo reboot and wait a while you should see openhab working if you navigate to <your device ip>:8080 If after aboul an hour still nothing SSH again and reboot again

That should be it

thx @LordVan and @EliasGabrielsson for looking into it. and thankfully others are facing this issue as well and my first guess about the zulu website was guiding into the right direction…

after sudo nano /opt/openhabian/functions/java-jre.bash

applying @LordVan 's fix

[in ] filter='.[] | select(.category_slug == "java-8-lts") | select(.packaging_slug == "jdk")|  select(.arch_slug == "arm-32-bit-hf") | .["bundles"] | .[] | select(.extension == "tar.gz") | .["link"]'
[out] #filter='.[] | select(.category_slug == "java-8-lts") | select(.latest == 1) | select(.packaging_slug == "jdk") | select(.arch_slug == "'$1'") | .["bundles"] | .[] | select(.extension == "tar.gz") | .["link"]$
  

and doing a reboot, initial install… completes

@EliasGabrielsson my pi is a http://socialcompare.com/en/review/raspberry-pi-3-b-plus

Thanks for the fix, but it installed the exact same version of the zulu jdk again that was already running. This is bad because this now happens every time I select “Upgrade System” to get all security patches for all software packages just in case:

$ java_install_or_update
openjdk version “1.8.0_222” OpenJDK Runtime Environment (Zulu8.40.0.178-CA-linux_aarch32hf) (build 1.8.0_222-b178) OpenJDK Client VM (Zulu8.40.0.178-CA-linux_aarch32hf) (build 25.222-b178, mixed mode, Evaluation)

Fixed… thanks

@TadyTheFish you can edit the post and add “```” (three backticks instead of one) before and after your first-boot.bash example to make it properly formatted:

echo -n "$(timestamp) [openHABian] Cloning myself... "
[ -d /opt/openhabian/ ] && rm -rf /opt/openhabian/ # check if we have remnants of a previous installation attempt.
git clone -b master https://github.com/openhab/openhabian.git /opt/openhabian &>/dev/null

sorry I can’t fix the large font … look at post jbviperrr to see how it should look

Hi there, I’ve also been affected by the Zulu install failure, but during an Upgrade System in openHABian Config. After updating openHABian Config after the submitted fix the upgrade went fine, but now always upgrades Zulu again when running an Upgrade System.

Just wanted to mention this as an FYI when looking further into this issue.

You were lucky today, couldn’t drop this issue. Developed a fast fix inline with @LordVan findings. Hope it will work, please try it out. Will be back on Sunday and look into it otherwise.