[SOLVED] (Raspberry Pi 4) openHABian v1.5.0 Error w/ Installing Zulu Embedded OpenJDK

Hello. I still have this problem when using the latest image (1.5.0).

I am a total noob when it comes to code (have never even used GitHub, nor have I ever worked with Linux). Yesterday I received my first rpi and thus I am still learning the basics.

After reading this thread I understand that in the file openhabian/functions/java-jre.bash. an “http” should be changed into “https”, but I am totally lost in how to achieve this.

Can anyone give me some pointers, given my 0 experience?

Would be greatly appreciated

Om_ni

1 Like

Hello Koen,

If you download the latest release, it should already be fixed

If not:
Via the command line you have to go to this directory. (cd openhabian/functions/)
Then you have to open the file with a text editor (sudo nano java-jre.bash)
With the arrows of your keyboard, you go to the desired line and change what you need go change.
Press ctrl-X to save and exit.

I recommend doing some tutorials on how to get started with Linux and Raspberry Pi. You’ll learn a lot and make better use of the device.

Hi guys - i have the same problem. Tryed to upgrade my openhab yesterday and it failed and the service stopped working. Because I am not a Linux expert, I did a clean reinstall with Openhabian 1.5.0 and ended up at the same problem everyone here has:

> 2019-10-19_07:49:38_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-19_07:49:41_CEST [openHABian] Initial setup exiting with an error!

I tried to edit the java-jre.bash file, but mine looks completely different like the one in chic’s post.

Then I went to the Azul website and followed their instructions for installing the Java-JRE manually but that also didn’nt work:

[08:12:35] openhabian@openhab:/opt/openhabian/functions$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
Executing: /tmp/apt-key-gpghome.9wEZbsW7SV/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
gpg: key B1998361219BD9C9: public key "Azul Systems, Inc. (Package signing key.) <pki-signing@azulsystems.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
[08:14:36] openhabian@openhab:/opt/openhabian/functions$ sudo apt-add-repository 'deb http://repos.azulsystems.com/debian stable main'
Traceback (most recent call last):
  File "/usr/bin/apt-add-repository", line 95, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 93, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Raspbian/buster

I am really confused. Why is it so hard on Linux to install something? And most important… how do I get my openhab working again?

@BrentV thank you for the help, however I have found a different fix.

Multiple people seem to have encountered this very same problem the last couple of days.
The fix can be found here:

This did it for me

Om-ni

1 Like

Same issue for my. Fresh install of openhabian v1.5 on a brand new pi 4. Fix described to far doesn’t work. File looks different and anyways - direct download of java distribution won’t work. So that’s probably the real reason behind that. Sorry to say that - but that’s far away from a “hassle free setup” :frowning_face: I’ve myself some linux experience but my understanding was that openhabian was meant to be an installation for guys how don’t necessarily have (or even want) that.

What a useless pejorative comment as your very first post.
Great start - welcome to openHAB!
You’re free to automate all the stuff yourself to get just a tiny idea of how many efforts are involved in doing so, and maybe - just maybe - come to value developers doing this stuff for free in their spare time.

Yes it’s annoying but that doesn’t make it any easier or quicker to solve.
The problem is not with openHABian but with Azul to change their website very often (maybe because they don’t want anyone to automate downloads?).
We’re working on a solution that is to last. In the meantime see how others work around it.

Hi Ole
I too struggled with this installation on my RaspberryPi.
I was frustrated at first, but realised that this system is far superior to others in the open source space and that there are many dedicated and competent contributors willing to spend their time and effort making this system better.
While it is intended to be as easy as possible to install, this software has to work with many different OS, many different end-user hardware items and many different control software implementations.
See https://www.openhab.org/docs/installation/linux.html
You will see what I mean.
This problem is one small install issue caused by a third party java solution that occurs only on RaspberryPis (I think).
It is fantastic that there are ready and willing helpers out there to assist in solving these problems.
The temporary solution is to edit two files.
As mentioned in other posts on this topic, the long term solution is to update the Java code to use the new APIs.
I am sure that the community would welcome any assistance doing that and providing and arrgh-free install system.

Hi Markus,

no offense meant! I clearly see that there is a lot of work in projects like this - all done by nice people in there sparse free time. I’ve openhab running for serveral years now based on a manual install and wanted to switch to openhabian now for easier maintenance while switching from pi 3 to pi 4.

A small hint on the openhabian download page for raspberry, that installation currently is broken would have helped me (and probably others) a lot in this case, spared some frustration and time on trying to install while it’s currently not possible with the file provided for download. It’s quite clear that openhabian project can’t help it, if external links are broken for whatever reason. Being an IT guy my own I know that even such a small change needs some work (and time) to get properly integrated in a distribution like openhabian, so maybe such a comment on the page is a good idea. After all other people like me might give openhabian a first try (and fails) at the moment and they will definitely get the wrong impression of the whole project by that.

A work around would be nice. And if it’s just a broken link issue that shouldn’t be do difficult - even for linux newbies. However - the workaround I’ve seen so far seems to be based on a different file version of java-jre.bash. Maybe that file is different in the openhabian version for raspbian? Any hint here would be greatly appreciated.

As a workaround I tried to install zulu manually following some other post. That worked only partially. Installation was successful, but the openhabian setup obviously wanted to check for updates first and failed with the same reasons as before.

Ole

1 Like

@mstormi Workaround from danpadure worked for me, too. Openhabian installation now finishes without further issues, and openhab is starting successfully. Awesome! Haven’t noticed the matching lines in java-jre.bash before, but was able to find’em now using search. Further configuration steps will have to wait for the next weekend, but at least the base installation is now finished.

thx
Ole

Hey there
I had the same problems, trying a lot of suggestions out of several forums (12 hours and more)… this one worked!
Thanks a lot for this detailled instruction!
btw, I had to reset my raspi and tried it the same way. the whole workaround was only successfull with a ethernet connection, not with wifi…

Hi, I’m new here and I have the same problem as OP, I’m currently trying danpadure’s fix but I don’t know how to SSH into the RPi, when I try SSH throught PuTTy it says connection refused, please help I’m almost giving up.

1 Like

Welcome to the OpenHAB community
don’t give up but perhaps start a new thread then yes

1 Like

Hi Markusl
Welcome to the OpenHAB community!
Thanks for contributing

Am I having the same problem on my openhabian ([master]v1.5-526(0986fff)) system?
After the run of “Upgrade System” I do see this:

$ java_install_or_update
openjdk version "1.8.0_152"
OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)

$ systemctl stop openhab2.service
openjdk version "1.8.0_152"
OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)
2019-10-28_17:43:09_CET [openHABian] Installing Java Zulu 32-Bit OpenJDK...
$ wget -nv -O /tmp/openhabian.K2qCz/zulu8.tar.gz
http://: Ungültiger Hostname.

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

The Java version is unchanged

openjdk version "1.8.0_152"
OpenJDK Runtime Environment (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 1.8.0_152-b76)
OpenJDK Client VM (Zulu Embedded 8.25.0.76-linux-aarch32hf) (build 25.152-b76, mixed mode, Evaluation)

and I had to restart openHAB.

I went through the Github link posted by @om_ni but my files “java-jre.bash”
and “first-boot.bash” do not match with the given description.

Im running into the same Problem with both upgrading and also a fresh and or manual install.
Johannes

from git hub thread:

2 Likes

:+1:
Worked! Thanks.
I was a bit worried before, because my “first-boot.bash” did look a bit different.

Just to be sure. I assume that the problems with installing the Zulu Embedded OpenJDK is independent of the Raspberry Pi hardware used. I see only the Pi 4 mentioned but I see the same trouble at installing Openhab on my RPI 3B+. Can someone please confirm that using the suggested solution will also work on the RPI 3B+ (and others)? Thanks to all contributing to this open source project!:+1:

it should be fixed in the latest revison of the openhabian config tool:

Does this mean that the fix is also made in the image for RPi available for download? Or is the manual install the only way to go at the moment? Please let me know what I can do as a newb lacking a lot of Linux knowledge.