[SOLVED] Keyserver problem first install openHABian 1.4.1 rPi2

  • Platform information:

    • Hardware: Raspberry Pi 2
    • OS: openHABian 1.4.1
    • Java Runtime Environment: Zulu Embedded OpenJDK
    • openHAB version: latest
  • Issue of the topic:
    After following steps in “Install openHABian (Recommended)” I found that after booting system for the first time, can’t install Zulu Embedded OpenJDK due to (tried Oracle Java with the same error):

gpg: keyserver receive failed: No keyserver available
FAILED (keyserver)

seems like it’s an issue with dirmngr, found similar problems, where proposed solution was to:

apt -y install dirmngr

In my case it doesn’t solve the problem.

Seems like currently openHABian image is broken.

  • If logs where generated please post these here using code fences:

2018-06-09_12:06:22_CEST [openHABian] Checking for root privileges… OK
2018-06-09_12:06:22_CEST [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK
2018-06-09_12:06:22_CEST [openHABian] openHABian configuration tool version: [master]v1.4.1-405(218edec)
2018-06-09_12:06:23_CEST [openHABian] Checking for changes in origin… OK
2018-06-09_12:06:30_CEST [openHABian] Installing Zulu Embedded OpenJDK…
$ apt -y install dirmngr
Reading package lists… Done
Building dependency tree
Reading state information… Done
dirmngr is already the newest version (2.1.18-8~deb9u1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

$ apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 219BD9C9
Executing: /tmp/apt-key-gpghome.6bxquwC3QT/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 219BD9C9
gpg: keyserver receive failed: No keyserver available
FAILED (keyserver)

I managed to find a solution to my problem.

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 219BD9C9
Executing: /tmp/apt-key-gpghome.6bxquwC3QT/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 219BD9C9
gpg: keyserver receive failed: No keyserver available
FAILED (keyserver)

In my case this was caused because rPi couldn’t reach hkp://keyserver.ubuntu.com. Hence “gpg: keyserver receive failed: No keyserver available” error message.

To resolve my problem I had to change DNS server rPi was using. It’s weird because pi had internet communication but it seems that my previous dns server couldn’t resolve hkp://keyserver.ubuntu.com:80 for some reason.

If anyone will face similar issue, change DNS server.

Thanks! Same here, it helps! I’ve set 8.8.8.8 on a router level and it now works… but how I can properly continue openHabian installation?