Initial setup failed on RasPi3B+ due to a Java - Zulu path error

Solved!

The issues described above do not longer occur. Thanks for the great support !!

Werner

1 Like

Hi all,

I just stumbled upon the same problem and followed @Benjy advice and uncommented the line
#if (/bin/bash /opt/openhabian/openhabian-setup.sh unattended_debug); then

I received the following results from the log file:

$ wget -nv -O /tmp/openhabian.3OSoK/zulu8.tar.gz
http://: Invalid host name.

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
FAILED
2019-10-17_22:00:43_CEST [openHABian] Initial setup exiting with an error!

My setup: Raspberry 2b with the latest version of openHABian (v1.5).

Any suggestions on how to proceed would be appreciated.

Best 4flixt

3 Likes

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

10 Likes

Dear @4est,
thank you for the suggestion. Where and when exactly do I change these lines?

Best, 4flixt

well, it’s written in the how to.

just edit those files

I guess there is no opt folder when you try to auto install openhabian with the sd card …
at least there is none for me …
i can see the first-boot.bash in the root of my sd card after creating the image but i think your solution does only work for upgrading java on a system that’s already set up. correct me if i am wrong.

/opt/openhabian is created when “Cloning myself” starts
That is before install fails because of the java

I did a fresh install with a openhabian sdcard

i will try again.
EDIT: My mac and my pc both do only see the “boot” volume. I’ll try flashing again …
EditEdit: Okay, waste of time. I do only see the boot partition and the only folder inside there is “overlays”.

2019-07-10_01:21:35_BST [openHABian] Starting the openHABian initial setup.
2019-07-10_01:21:35_BST [openHABian] Storing configuration... OK
2019-07-10_01:21:35_BST [openHABian] Starting webserver with installation log... OK
2019-07-10_01:21:42_BST [openHABian] Changing default username and password... OK
2019-10-18_17:24:32_BST [openHABian] Setting up Ethernet connection... OK
2019-10-18_17:24:32_BST [openHABian] Ensuring network connectivity... OK
2019-10-18_17:24:32_BST [openHABian] Waiting for dpkg/apt to get ready... OK
2019-10-18_17:24:59_BST [openHABian] Updating repositories and upgrading installed packages... OK
2019-10-18_17:29:47_BST [openHABian] Installing git package... OK
2019-10-18_17:30:07_BST [openHABian] Cloning myself... OK
2019-10-18_17:30:10_BST [openHABian] Executing 'openhabian-setup.sh unattended'... 
2019-10-18_17:30:10_BST [openHABian] Checking for root privileges... OK
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease
Reading package lists...
2019-10-18_17:30:16_BST [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2019-10-18_17:30:16_BST [openHABian] Setting timezone based on IP geolocation... OK (Europe/Berlin)
2019-10-18_18:31:18_CEST [openHABian] Setting locale based on openhabian.conf... OK
2019-10-18_18:32:45_CEST [openHABian] Setting hostname of the base system... OK
2019-10-18_18:32:46_CEST [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2019-10-18_18:32:46_CEST [openHABian] Enabling Audio output... OK
2019-10-18_18:32:46_CEST [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2019-10-18_18:33:36_CEST [openHABian] Installing additional needed packages... OK
2019-10-18_18:33:58_CEST [openHABian] Installing additional bluetooth packages... OK
2019-10-18_18:34:05_CEST [openHABian] Adding slightly tuned bash config files to system... OK
2019-10-18_18:34:05_CEST [openHABian] Adding slightly tuned vim config file to system... OK
2019-10-18_18:34:05_CEST [openHABian] Downloading and setting up FireMotD... 

After the installation got stuck i cut the power to the raspberry and put the sd card into a reader because i was not able to connect via samba yet (or is this the only way i can see the opt folder?)
i am stuck here …

1 Like

Stick the SD card back in, boot and use putty to SSH into you raspi.
Then type:
sudo nano /opt/openhabian/functions/java-jre.bash
Comment the line under # Fetch and copy new JAVA runtime
and paste the line 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
(Or simply replace it).
Press CTRL+X, Y to save

Then sudo nano /boot/first-boot.bash
Comment the lines as @4est explained
CTRL+X, Y to save

then to restart the first boot script:
sudo bash /boot/first-boot.bash

I’m currently running it, will update when done

2 Likes

`Seems to be working:
2019-10-18_20:45:42_CEST [openHABian] Downloading and setting up FireMotD… OK
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)
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)
2019-10-18_20:46:57_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK… OK
2019-10-18_20:47:58_CEST [openHABian] Installing or upgrading to latest openHAB release (stable)… OK
2019-10-18_20:48:45_CEST [openHABian] Adding an openHAB dashboard tile for ‘openhabiandocs’… OK
2019-10-18_20:48:46_CEST [openHABian] Adding openHAB syntax to vim editor… OK
2019-10-18_20:48:46_CEST [openHABian] Adding openHAB syntax to nano editor… OK
2019-10-18_20:48:47_CEST [openHABian] Adding openHAB scheme to multitail… OK
2019-10-18_20:48:47_CEST [openHABian] Preparing openHAB folder mounts under /srv/… OK
2019-10-18_20:48:47_CEST [openHABian] Applying file permissions recommendations… OK
2019-10-18_20:48:50_CEST [openHABian] Applying miscellaneous system settings… OK
2019-10-18_20:48:50_CEST [openHABian] Setting up Samba network shares… OK
2019-10-18_20:49:59_CEST [openHABian] Installing Node.js for arm (prerequisite for other packages)… OK
2019-10-18_20:50:07_CEST [openHABian] Installing the openHAB Log Viewer (frontail)… OK
2019-10-18_20:50:37_CEST [openHABian] Adding an openHAB dashboard tile for ‘frontail’… OK
2019-10-18_20:50:38_CEST [openHABian] Execution of ‘openhabian-setup.sh unattended’ completed.
2019-10-18_20:50:38_CEST [openHABian] Waiting for openHAB to become ready…1…2…3…4…OK
2019-10-18_20:51:18_CEST [openHABian] Visit the openHAB dashboard now: http://big_openhab:8080
2019-10-18_20:51:18_CEST [openHABian] To gain access to a console, simply reconnect.
2019-10-18_20:51:18_CEST [openHABian] First time setup successfully finished.

1 Like

Works like a charm, thanks!

2 Likes

well, it took me a while to figure out where to apply the fix, but in the end it’s an easy workaround and this way openhab installs can continue until the developers implement the new zulu java api

happy to help you and thanks for explaining the fix for everyone to understand (you missed creating the ssh file on the sdcard to enable ssh though)

1 Like

thanks it worked.
forgot that i also have to use the ssh command in the terminal when connecting to the raspberry. tried with smb and obviously it did not work.

Hey all, thank you again @4est! Everything worked now for me.
What really confused me was that I couldn’t see any files or folders on my raspberry (while beeing connected via ssh).
So it seemed like there was no /opt/openhabian/functions/java-jre.bashfile.
But as @TomP said typing sudo nano /opt/openhabian/functions/java-jre.bash opened the file and I was able to make the changes.
After a reboot (sudo reboot) the first-boot routine started again and everything finished succesfully on the first try.

Thanks all for you help!

new solution after error
enter in sudo nano /opt/openhabian/functions/java-jre.bash instert the line after filter like this

| jq -r "$filter"`

downloadlink=“https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz
if [ -z “$downloadlink” ]; then return 1; fi

Worked like a charm @4est , many thanks!!

1 Like

I have the same problem when I try to install Openhabian version on the raspberry.
When will the problem be solved?
Can I install zulu (or copy the installation file) manually (where?) and after restart the automatic installation rebooting the system?
How?

I try with manual installation with openhabian-config but always error.
Thanks.

Ahh, Thank you. it works! I have been struggling on it for days.

Thx for that workaround! Is this reported already as an issue?

it is reported. but since it was a reoccurring issue, they merged it with a similar older issue, which is “closed”