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.
thnx ,did ur workaround and updated just fine to 1.8.0_222 using openhabian-config.Just one thingā¦when i run packages update from openhabian-config it overwrites/updates java again.Why is that?
Well this looks to solve the problem after the raspberry is running (java is finally installed), however the java-jre.bash file is overwritten each time the raspberry is booting meaning the the fist-boot procedure is failing each time.
Which file should be updated to ensure the first boot template is updated?
Note tthat this issue is the same with version 1.4 and 1.5
Avoid the boot script to get the template from github (take a backup copy )
2.1 sudo cp first-boot.bash first-boot.bash-ori
2.2 sudo nano first-boot.bash
- Find (CtlW): Cloning Myself
- Comment the line
from:
echo -n "$(timestamp) [openHABian] Cloning myselfā¦ "
to:
ln -sfn /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config
2.3 Save the file (CtlX + Y)
Reboot the system and wait the full installation by monitoring the console terminalā¦
3.2 sudo reboot now
3.3 ssh to the raspberry
- You should now see the installed banner:
Hi 4est, this workaround works, but after initial successful install each time the raspberry is booting, fist-boot procedure starting again and again. How to prevent doing this?
Anyway, it is far not hasle free. I am not a develloper, it takes days to me to find the solution. Dissapointedā¦
It canāt be a solution if an update breaks the system. This is not your fault @tramlaan, but I donāt understand why Openhab developers donāt solve this issue.
There isnāt a single entity that is the openHAB developers because openHAB is a open source community project. The error happens because Azul the Zulu provider changed something. But the maintainers of openhabian know about It as there is an issue for this on github you can find here:
Didnāt you experience the same? It is weird, I did a completely new install without any modifications. As I can see @tramlaan had the same problem, see above.
I have been using Openhab for 3 ages, but I am not familiar with Linux. I just look for some tutorials and read them. This is how I develop, so such a bug can completely stop me. I am not able to investigate such an issue. I think I have to wait until the issue will be resolved. Thak you
Hi There. Iām completely new to OpenHab, Pi and Linux ā great combination right
Iāve download the openhub 1.5 image and am trying to install it on a brand new 4GB pi4 B. I run into the same problem as above.
Excerpt from the installation log:
2019-10-27_16:45:10_CET [openHABian] Downloading and setting up FireMotDā¦ OK
2019-10-27_16:46:13_CET [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-10-27_16:46:18_CET [openHABian] Initial setup exiting with an error!
I have tried to fetch the package again, re-flashing the micro-SD card and rerun the installation several times. Have used openHab 1.5 (=latest) and BalenaEtcher 1.5.59 (=latest), running on a Win10 1909 system.
Is this a problem with the Java Zulu somehow, something wrong with the OpenHab 1.5 or something else?
Thanks for all suggestions on how to remedy this problem, so I can start using my Raspberry Pi4
The issue seems to lie with a change of API at Zulu. A capable developer of openHAB would need to adapt the installation script.
It seems like at the moment the error seems to prevent any new installations, especially by people who are not experienced with these things.
Fixes that in return disable the update process do not seem viable to me - thatās something I donāt even want to try because I might forget down the road and run into follow-up issues.
I hope there is a fix for this, soon! Cheers and thanks!
I agree that the main issue should have to be corrected by the developers and in this case it looks quite easy.
This is only a temporary workaround to finalize an installation
My explanation of the problem.
Since a few days ā¦ the OpenHAbain 1.x fails at the first installation because the reference to the java repository is missing
During the first installation the script (/boot/first-boot.bash) gets a set of .bash template files to be executed at first start-up.
These are copied from the github server and are finally located under /opt/openhabian/functions
Each time the raspberry is booting, and if the first boot was not successful (which is the case due to java), the first-boot.bash scripts download and overwrite the /opt/openhabian/functions
and therefore the corrected java-jre.bash. Which cause the problem to loop again and again with the same error
So to achieve a correct fist boot we have to avoid that the first-boot.bash from copying the files from the github site after having modify the java-jre.bash file.
This is the reason of the second modification, which avoid to get the templates from github by commenting the following 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
#if [ $? -eq 0 ]; then echo āOKā; else echo āFAILEDā; fail_inprogress; fi #ln -sfn /opt/openhabian/openhabian-setup.sh /usr/local/bin/openhabian-config
You may now reboot the raspberry and the first installation shall be successful
And be ready for the next issue (at my knowledge changing the host name)
Hello, im trying to follow these steps but when i open the file I canāt see a line:"# Fetch and copy new JAVA runtime". What should i replace?
This is my file:
#!/usr/bin/env bash
# shellcheck disable=SC2181
## Install best suitible java version depending on platform.
## Valid argument choose between: 64-bit, 32-bit
##
## java_install_and_update(String arch)
##
java_install_or_update(){
# Make sure we don't overwrite existing none Java Zulu installations
if ! [ -x "$(command -v java)" ] || [[ ! "$(java -version)" == *"Zulu"* ]]; then
cond_redirect systemctl stop openhab2.service
if [ "$1" == "64-bit" ]; then
if is_x86_64; then
java_zulu_enterprise_8_apt
else
if java_zulu_tar_update_available; then java_zulu_8_tar 64-bit
fi fi
else # Default to 32-bit installation if java_zulu_tar_update_available; then
java_zulu_8_tar 32-bit fi
fi
cond_redirect systemctl start openhab2.service
fi }
## Install Java Zulu 8 from direct from fetched .TAR file ## Valid argument choose between: 64-bit, 32-bit
##
## java_zulu_8_tar(String arch) ##
java_zulu_8_tar(){
local link
local jdkTempLocation
local jdkInstallLocation
local jdkBin
local jdkLib
local jdkArch
local jdkSecurity
if [ "$1" == "32-bit" ]; then
echo -n "$(timestamp) [openHABian] Installing Java Zulu 32-Bit OpenJDK... "
if is_arm; then
link="$(fetch_zulu_tar_url "arm-32-bit-hf")";
jdkArch="aarch32"
else
link="$(fetch_zulu_tar_url "x86-32-bit")";
jdkArch="i386"
fi
if is_aarch64; then
dpkg --add-architecture armhf
cond_redirect apt-get update
cond_redirect apt -y install libc6:armhf libncurses5:armhf libstdc++6:armhf
fi
if is_x86_64; then
dpkg --add-architecture i386
cond_redirect apt update
cond_redirect apt -y install libc6:i386 libncurses5:i386 libstdc++6:i386
fi