openhabian: OpenHABian manual install fails if zulu CDN not available

For some reason even though cdn.azul.com resolved and pings fine, downloading Zulu failed with:

...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
https://cdn.azul.com/zulu-embedded/bin/zulu8.40.0.178-ca-jdk1.8.0_222-linux_aarch32hf.tar.gz: Invalid host name.

gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
FAILED

This exited to the prompt, stopping a manual install.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 3
  • Comments: 33 (11 by maintainers)

Most upvoted comments

I researched the API this weekend which sadly does not expose the “ARM” packages currently. I will patch with a static link.

I can confirm that #754 has fixed the issue - my setup was successful! Many thanks @bodiroga! @mstormi I have reached out to my contact at Azul, let’s see what they say.

@EliasGabrielsson When you’re on it, can you also add a check for installed java version and skip install when its version is equal to or later than latest downloadable? That’s how apt/dpkg do and it would fix #723.

I just came across this issue myself as I tried to setup a new RasPi with openHABian and it failed… So I absolutely agree that this is a very critical issue.

I will patch with a static link.

@EliasGabrielsson When will you be able to do this? Hopefully asap! If it fixes it for all RasPi users, I think the criticality of the issue is greatly reduced.

Shall I get a contact at Azul to discuss why the new API does not contain ARM packages and how we should proceed from here?

@mstormi Hi Markus, have you seen this issue? I see a recent commit in Master for other issues but it appears this has far higher priority, it stops all fresh installs.

The problem ( as noted by @EliasGabrielsson ) is that Azul have changed the zulu8 endpoint and return object. This results in the following error:

2019-10-18_10:32:26_EEST [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

A workaround is as follows:

1: Open /opt/openhabian/functions/java-jre.bash

replace “$link” (current line 87) with the full URL to the updated zulu8 from Azul:

 # 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

Comment out these 3 lines (current lines 148-150)

# 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

Reboot openhabian and it should successfully install.