Error while installing Halyard - **Error: retrieving gpg key timed out.** - Ubuntu 16.04 - On Oracle Virtual box


#1

I’m trying to install halyard on ubuntu16.04(Ubuntu installed in vm - Orcale vm box) and tried NAT and Bridge adapator as Network settings in oracle vm box.
.
.
In Ubuntu…
I have downloaded installhalyard script using curl curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/debian/InstallHalyard.sh

After Im executing sudo bash InstallHalyard.sh to install halyard command. But Its not getting installed and showing the below error

jayanth@jayanth-VirtualBox:~$ sudo bash InstallHalyard.sh 
[sudo] password for jayanth: 
Please supply a non-root user to run Halyard as: jayanth
Halyard version will be stable 
Halyard will be downloaded from gs://spinnaker-artifacts/halyard 
Halyard config will come from bucket gs://halconfig 
Halconfig will be stored at /home/jayanth/.hal/config
Uninstall script is located at /home/jayanth/.hal/uninstall.sh
Running ubuntu 16.04
gpg: keyring `/tmp/tmptyeoozb6/secring.gpg' created
gpg: keyring `/tmp/tmptyeoozb6/pubring.gpg' created
gpg: requesting key 86F44E2A from hkp server keyserver.ubuntu.com
**Error: retrieving gpg key timed out.**
gpg: /tmp/tmptyeoozb6/trustdb.gpg: trustdb created
gpg: key 86F44E2A: public key "Launchpad OpenJDK builds (all archs)" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

Tried pinging keyserver.ubuntu.com (Able to ping to ubuntu keyserver)… but still facing the same issue

Please help me here.


#2

Based on the output there, it looks like the install script may have recovered from the failure. Do you see the key noted there in the output of sudo apt-key list? If so, I think you can ignore the error. If Halyard isn’t successfully installing, I suspect there may be something later in the install script that’s failing. Do you see any error messages later in the output?


#3

Yes, I have seen list of keys when executed

sudo apt-key list

But still when I tried to run IntsallHalyard script,
I see the same errors…

Error: retrieving gpg key timed out.
gpg: /tmp/tmptyeoozb6/trustdb.gpg: trustdb created
gpg: key 86F44E2A: public key “Launchpad OpenJDK builds (all archs)” imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK


#4

I’m interested in whether there are other error messages later in the output—after the message about failing to get the key, does Halyard continue to install? If not, are there further messages?


#5

Nothing got continued after that message…
Here is the complete output from apt-key list…

jayanth@jayanth-spinnaker:~$ apt-key list
/etc/apt/trusted.gpg

pub 1024D/437D05B5 2004-09-12
uid Ubuntu Archive Automatic Signing Key ftpmaster@ubuntu.com
sub 2048g/79164387 2004-09-12

pub 4096R/C0B21F32 2012-05-11
uid Ubuntu Archive Automatic Signing Key (2012) <ftpmaster@ubuntu. com>

pub 4096R/EFE21092 2012-05-11
uid Ubuntu CD Image Automatic Signing Key (2012) <cdimage@ubuntu. com>

pub 1024D/FBB75451 2004-12-30
uid Ubuntu CD Image Automatic Signing Key <cdimage@ubuntu. com>

/etc/apt/trusted.gpg.d/openjdk-r_ubuntu_ppa.gpg

pub 1024R/86F44E2A 2010-04-12
uid Launchpad OpenJDK builds (all archs)

jayanth@jayanth-spinnaker:~$ sudo bash InstallHalyard.sh
[sudo] password for jayanth:
Sorry, try again.
[sudo] password for jayanth:
Sorry, try again.
[sudo] password for jayanth:
Please supply a non-root user to run Halyard as: jayanth
Halyard version will be stable
Halyard will be downloaded from gs://spinnaker-artifacts/halyard
Halyard config will come from bucket gs://halconfig
Halconfig will be stored at /home/jayanth/.hal/config
Uninstall script is located at /home/jayanth/.hal/uninstall.sh
Running ubuntu 16.04
gpg: keyring /tmp/tmppkvc3v87/secring.gpg' created gpg: keyring/tmp/tmppkvc3v87/pubring.gpg’ created
gpg: requesting key 86F44E2A from hkp server keyserver.ubuntu.com
Error: retrieving gpg key timed out.
gpg: /tmp/tmppkvc3v87/trustdb.gpg: trustdb created
gpg: key 86F44E2A: public key “Launchpad OpenJDK builds (all archs)” imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK

Thanks for getting back … Please let me know if any more information required… :slight_smile:


#6

I’m honestly not sure what’s happening here. The command it’s running to yield the output you see is: add-apt-repository -y ppa:openjdk-r/ppa so you could try running that alone and see what it yields. After that, it generally runs sudo apt-get update.

More generally, adding the -x flag might help see what’s actually going on in the bash script. sudo bash -x InstallHalyard.sh; I’m confused why a successful exit from the add-apt-repository would be the last thing the install script does.


#7

I have again tried sudo apt-get update this time and installed open ssh client and server.

This time it got worked.:smiley:

Thank for helping :+1: