Openhabian config error on upgrade system

This one worked!

Thank you @SibasishPasupalak !

1 Like

Hi there,
I followed this workaround. But now my HabPanel items donā€™t work anymore. I use the 5-events-calendar and all entries say ā€œundefā€.
Can you give me a hint how to repair that? (I really donā€™t know anything about Jave.))

I have the same problem, I am trying to install openhabian on a new pi 3 b.

2019-10-18_18:35:16_CEST [openHABian] Downloading and setting up FireMotD... OK 
2019-10-18_18:36:50_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-10-18_18:36:58_CEST [openHABian] Initial setup exiting with an error!

I have the same problem. I want to do a fresh installation with openhabian image version 1.5.1 on a pi.

$ apt-get --yes upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  rpi.gpio-common triggerhappy
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ java_install_or_update

$ systemctl stop openhab2.service
Failed to stop openhab2.service: Unit openhab2.service not loaded.
2019-10-18_20:05:36_CEST [openHABian] Installing Java Zulu 32-Bit OpenJDK...
$ wget -nv -O /tmp/openhabian.2hjxH/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

Hi!

I canā€™t see an opt folder on my sd card.

To see this folder you have to login in your system. Login: openhabian password: openhabian.

yeah, I know, I wrote the fix :slight_smile:
danpadure itā€™s me on github :wink:

1 Like

@SibasishPasupalak
Thx, It worked for me!

Is there a way to solve the problem of reinstalling the image on a RasPi4?

Thx, @SibasishPasupalak

This worked for me:

1 Like

Dan, on Githunb you wrote:

change the middle line. this will skip the java selection

But where exactly is ā€œthe middle lineā€ in my bash 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

A Big Thanx @4est! That was a quick Fix !

1 Like

Thanx To @4est

I posted 3 lines. you only have to change the middle one. I only posted the lines before & after so you can search for it.

Ahh ofcouseā€¦ Sorry I misunderstoodā€¦ Have changed it now.
Unfortunaly it doesnt seem I have a /boot/first-boot.bash (neither a first-boot.sh).
So IĀ“m a bit stuck here.

@Kim_Andersen, best is to start over from a fresh image. Boot the rasp and wait until the first time install stopped. SSH into your rasp and the you will see that both files are still there. Change both files and reboot. That worked for me!

If you would off rebooted after the first unsuccesfull install, without changing the first-boot.bash, the first-boot.bash will be gone. That was at least my experience.

Succes,
Mario

I took the chance - Without editing the first-boot.bash I entered openhabian-config and ran the #02. It succeded installing openhab 2.5M4 without any problems, (beside quite a few errors and warning when starting openhab again, but that seems to be common).
After a empty cache/tmp and a few restarts, everything seems to be working.

Hello Kim,
Iā€™m complete new in openhab. And also it is more or less my first time working with an raspi. I could not find the mentioned code lines in the bash file. There is nothing mentioned from java.

Iā€™m now trying to setup the openhab on a raspi 4.

Could you give me any further support how to find.

Would be great

Thx

Jochen

Maybe post your bash file in here. IĀ“m sure we can find what youĀ“re looking forā€¦

In the meanwile I found the code lines in the bashfile.
After the first failed setup of openhab i put in

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

to open the file.

Then I changed


filter='.[] | select(.category_slug == "java-8-lts") | select(.latest == 1) | select(.packaging_slug == "jdk") | select(.arch_slug == "'$1'") | .["bundles"] | .[] | select(.extension == "tar.gz") | .["link"]$

into

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

and safe the file.

The I checkt the file if the line is still there.

In the next step I reboot the raspberry. again with a fail.

After reopen the file. It is again the original version.

I believe this is due to the step 2 you have to do, (remark the 3 lines in first-boot.bash from this link:)