First openHABian install on a Pi 3B failing

I’ve tried a few openHABian installs using Etcher to burn the image and I keep getting the same error.

[20:30:31] openhabian@openHABianPi:~$ cat /boot/first-boot.log
2018-03-13_22:53:52_UTC [openHABian] Starting the openHABian initial setup.
2018-03-13_22:53:53_UTC [openHABian] Storing configuration... OK
2018-03-13_22:53:56_UTC [openHABian] Changing default username and password... OK
2018-09-02_20:27:51_UTC [openHABian] Setting up Ethernet connection... OK
2018-09-02_20:27:51_UTC [openHABian] Ensuring network connectivity... OK
2018-09-02_20:27:52_UTC [openHABian] Waiting for dpkg/apt to get ready... OK
2018-09-02_20:28:34_UTC [openHABian] Updating repositories and upgrading installed packages... OK
2018-09-02_20:35:18_UTC [openHABian] Installing git package... OK
2018-09-02_20:36:04_UTC [openHABian] Cloning myself... OK
2018-09-02_20:36:06_UTC [openHABian] Executing 'openhabian-setup.sh unattended'...
2018-09-02_20:36:06_UTC [openHABian] Checking for root privileges... OK
2018-09-02_20:36:06_UTC [openHABian] Loading configuration file '/etc/openhabian.conf'... OK
2018-09-02_20:36:06_UTC [openHABian] Setting timezone based on IP geolocation... OK (America/New_York)
2018-09-02_16:37:44_EDT [openHABian] Setting locale based on openhabian.conf... OK
2018-09-02_16:38:19_EDT [openHABian] Setting hostname of the base system... OK
2018-09-02_16:38:20_EDT [openHABian] Setting the GPU memory split down to 16MB for headless system... OK
2018-09-02_16:38:20_EDT [openHABian] Enabling Audio output... OK
2018-09-02_16:38:20_EDT [openHABian] Installing basic can't-be-wrong packages (screen, vim, ...)... OK
2018-09-02_16:39:32_EDT [openHABian] Installing additional needed packages... OK
2018-09-02_16:39:56_EDT [openHABian] Installing additional bluetooth packages... OK
2018-09-02_16:40:09_EDT [openHABian] Adding slightly tuned bash config files to system... OK
2018-09-02_16:40:09_EDT [openHABian] Adding slightly tuned vim config file to system... OK
2018-09-02_16:40:09_EDT [openHABian] Downloading and setting up FireMotD... OK
2018-09-02_16:40:47_EDT [openHABian] Installing Zulu Embedded OpenJDK... FAILED (keyserver)
2018-09-02_16:40:51_EDT [openHABian] Initial setup exiting with an error!

If I start openhabian-config and install stuff from there and reboot, I get a little farther (though the “installing Zulu” error still shows)…

2018-09-02_20:55:37_EDT [openHABian] Starting the openHABian initial setup.
2018-09-02_20:55:37_EDT [openHABian] Storing configuration... OK
2018-09-02_20:55:37_EDT [openHABian] Changing default username and password... SKIPPED
2018-09-02_20:55:37_EDT [openHABian] Setting up Ethernet connection... OK
2018-09-02_20:55:37_EDT [openHABian] Ensuring network connectivity... OK
2018-09-02_20:55:38_EDT [openHABian] Waiting for dpkg/apt to get ready... OK
2018-09-02_20:56:54_EDT [openHABian] Updating repositories and upgrading installed packages... OK
2018-09-02_20:57:08_EDT [openHABian] Installing git package... OK
2018-09-02_20:57:17_EDT [openHABian] Cloning myself... FAILED
2018-09-02_20:57:17_EDT [openHABian] Initial setup exiting with an error!

Any ideas?

Thanks

That is a weird error.

I recommend filing an issue on the openHABian project. This looks like something they need to look at.

Do some debugging first, without that noone will be able to help:
Call /opt/openhabian/openhabian-setup.sh unattended_debug
or insert “set -x” at the beginning of/opt/openhabian/functions/java-jre.sh to see what’s doing.
You can try to manually execute those commands in the zulu routine of java-jre.sh as well.
If I was to guess, the repository key changed or you failed to reach the server.

I was thinking of filing an issue also. It appears there are a few timing issues in regards to Wifi setup. Basically, commands get issued before the network is available. I added some sleeps to the first boot.sh and setup worked great.

I have not had the time to document my findings yet.

Well openHABian is supposed to be installed from wireline, but if you found a way to get WiFi (only) networking
to work then I suggest you file a pull request right away (not an issue).

Thanks Markus ! Didn’t realize I was supposed to be using a wired line! Lol that explains why it works on my production pi. I had it wired…

I will document my findings and post a request.

Since it’s just standard Raspbian under the covers, wouldn’t adding the wpa_supplicant.conf file and an empty ssh file in boot before taking the SD card out of the computer where the user ran Etcher work? Or did the minimal base remove that capability?

I set up all of my RPis that way since most of them are mounted to a wall with jumper cables wired to them making moving them difficult.

Possibly yes. I think that part of the code just wasn’t reworked since WiFi capability was added to the Pi line.
So same answer to you: if you got/get that to work, please file a pull request.

It would be updates to the installation docs. Does that go in openhabian’s README or the docs repo?

Well it’s already in, sort of. See build script being mentioned in the README, and see /opt/openhabian/build-image/openhabian.pi-raspbian.conf, there you can enter your SSID+pass and create an image to contain these.
I think noone has come up with a more clever idea how to query the user in the initial install phase as it’s supposed to be an unattended install.

Yes, it looks like openHABian implements their own version of the standard Raspbian approach and I bet ssh is always enabled by default. So there really isn’t anything to add.