Openhabian SD image installation fails

@Thedannymullen: I have done the manual setup a few times already. The same command is the showstopper every time:

The command
“apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9” get the ressponse
“gpg: keyserver receive failed: No keyserver available”.

I have tried with other keyservers also, all with the same result.

@H102: I will have to find a way to test if the power actually may output 2600 mA. That is its specification, though.

Ok try this. Open /etc/resolv.conf and put your name server as 8.8.8.8.

Then try the manual command. This could be a dns issue. Let me know.

At this point I believe any power issues you may have had are resolved.

Come on guys, it’s reasonably unreasonable to believe an insufficient power supply to have a effect on Ethernet/IP processing (and only there).
Do you use the WiFi interface ? Can you ping anything on the internet ? Did you open your router to allow for outbound NAT connections ?
Debug your networking setup to get that apt-get command to work, then the rest of openHABian install will likely succeed.

I asked the same question above…

And he replied that he does get an IP address from DHCP and can ping public addresses.

To clarify and summarize.

This issue as stated above is due to a sleep delay that is needed in the first boot.sh. For some reason the apt-get fails without it. Further trouble shooting being done, but in the interim the sleep resolved the issue.

The java failure I believe is related to a possible dns issue. Also, stated above the request to try adding the public dns 8.8.8.8 to resolv.conf. If it works then we know how to resolv this one.

Lastly, some of the first issues the OP had are believed to be a power supply as it was failing at some initial stages prior to network being needed. Note this issue appears resolved and only the two networking issues appear to be open until I receive confirmation from the OP that the suggestions provided fixed it.

He didn’t say if it’s the Ethernet or WiFi interface to be active (or both?).
The primary (and at this stage ONLY) interface to get an IP should be Ethernet.
Read somewhere there’s known issues if you try the initial install via WiFi.

Hello,

Sorry for my late response, I have been barred due to too many postings on my first member day :smiley:

I have got more output when trying to fetch keys, is there some issue with gpg/dirmngr? Starting the dirmngr after trying to fetch keys suceeds, but reports some issues and make missing directories. I have no idea if this is normal. Repeating the “apt-key adv” command afterwards give the same result as the initial one:

[21:27:56] root@openHABianPi:/# apt-key adv -vv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
Executing: /tmp/apt-key-gpghome.RJCPtwsfuS/gpg.1.sh -vv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
gpg: no running Dirmngr - starting ‘/usr/bin/dirmngr’
gpg: waiting for the dirmngr to come up … (5s)
gpg: connection to the dirmngr established
gpg: keyserver receive failed: No keyserver available

[21:28:16] root@openHABianPi:/# /usr/bin/dirmngr
dirmngr[4400]: error opening ‘/root/.gnupg/dirmngr_ldapservers.conf’: No such file or directory
dirmngr[4400.0]: permanently loaded certificates: 0
dirmngr[4400.0]: runtime cached certificates: 0
dirmngr[4400.0]: failed to open cache dir file ‘/root/.gnupg/crls.d/DIR.txt’: No such file or directory
dirmngr[4400.0]: creating directory ‘/root/.gnupg’
dirmngr[4400.0]: creating directory ‘/root/.gnupg/crls.d’
dirmngr[4400.0]: new cache dir file ‘/root/.gnupg/crls.d/DIR.txt’ created
Home: /root/.gnupg
Config: [none]
OK Dirmngr 2.1.18 at your service
^C

[21:50:12] root@openHABianPi:/# ls /root/.gnupg
crls.d private-keys-v1.d S.gpg-agent S.gpg-agent.browser S.gpg-agent.extra S.gpg-agent.ssh

[21:51:22] root@openHABianPi:/# apt-key adv -vv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
Executing: /tmp/apt-key-gpghome.Qqfm39LeMB/gpg.1.sh -vv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9
gpg: no running Dirmngr - starting ‘/usr/bin/dirmngr’
gpg: waiting for the dirmngr to come up … (5s)
gpg: connection to the dirmngr established
gpg: keyserver receive failed: No keyserver available

@mstormi: The eth0 interface is active, the wifi not. And NAT outbound is allowed in my router.

Have you tried changing your DNS server to something else? Try maybe google 8.8.8.8 or 8.8.4.4 OpenDNS may also be worth a try.

Still using the openhabian image install?

Hi,all,
I’m having the exactly same problem. Really hope anyone could give a solution, not just repeating power supply issue.

Then you likely have a problem with your internet setup, most likely your DNS.
What’s the output of nslookup keyserver.ubuntu.com ?

@mstormi: -bash: nslookup: command not found

I believe that dnsutils is not installed by the install script. But ping works fine:

[09:35:16] openhabian@openHABianPi:~$ ping keyserver.ubuntu.com
PING keyserver.ubuntu.com (91.189.89.49) 56(84) bytes of data.
64 bytes from boquila.canonical.com (91.189.89.49): icmp_seq=1 ttl=56 time=32.9 ms

after installing dnsutils i get:
[09:42:18] openhabian@openHABianPi:~$ nslookup keyserver.ubuntu.com
Server: 192.168.1.1
Address: 192.168.1.1#53

Non-authoritative answer:
Name: keyserver.ubuntu.com
Address: 91.189.90.55
Name: keyserver.ubuntu.com
Address: 91.189.89.49

Still same result from “apt-key adv” BUT:

I notice that my router LAN settings need to be updated. After this, fetching keys results in success :smiley:

I will check the complete setup and file my findings. But @mstormi: Thanks:-D

Hmm, strange why the apt-get command fails for you.
Execute echo '91.189.90.55 keyserver.ubuntu.com' >>/etc/hosts and try that apt-get again.
What does /etc/resolv.conf look like ?

To proceed with your installation, you can comment that out in Java installation (java_zulu_embedded) in /opt/openhabian/functions/java-jre.sh.

Actually I’m not sure if to retrieve Ubuntu repo keys is needed at all there or if it’s just an artifact of some previous installation method … @elias_gabrielsson any opinion on this ?

@mstormi: Thank you very much. This seems to work now. :smiley:

I noticed from the nslookup command after installing dnsutils, that my LAN gw adress was incorrect. After updating in /etc/resolv.conf and correcting my router settings the keys are fetched normally. And the install passes the zulu/java8 step.

And now:

@calmair521: Check if your LAN GW address in your /etc/resolv.conf file is correct, and update it if not. This worked for me.

The LAN GW address will be in there by default.
The proper action to take instead would be to correctly configure your LAN GW to respond to DNS queries.
Please do as keeping the current ‘solution’ has a number of drawbacks such as to be dependant upon a working Internet connection.
Please also try if that makes your first problem go away.

@Thedannymullen: The nameserver track was correct. I needed to change may LAN gw settings, and adjusted my /etc/resolv.conf file. How can I best file the experience to new members?

1 Like

@mstormi: Yes. I will edit my solution for this.

Not sure how to communicate to new members exactly. This is a rare occurrence.

The solution came from a raspian forum someone had this issue with a key server. It’s a raspian dns bug or something that causes this.