Can't connect to the keyserver.ubuntu.com..!

Can’t connect to the keyserver.ubuntu.com…!!

It failed with output…

mongod-m103: requesting key A15703C6 from hkp server keyserver.ubuntu.com
mongod-m103: ?: keyserver.ubuntu.com: Host not found
mongod-m103: gpgkeys: HTTP fetch error 7: couldn’t connect: Connection timed out
mongod-m103: gpg: no valid OpenPGP data found.
mongod-m103: gpg: Total number processed: 0
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Please try again from your home network or disabling anit-virus/firewall.

Kanika

Hi Kanika,

I tried to disable both of them, but still throwing same error.

Are you able to access the above url? Try connecting from your home network or home system if you are using office network/system.

This means your system is blocking the request, it can be your network, firewall or anti-virus.

Kanika

if you are connected to vpn , disconnect , remove M103 directory , start from scratch again, it works.

In case it’s useful for anyone else, I was caught behind a work proxy. Editing the apt-key line in provision-mongodb to be

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6

That is, replacing the original --keyserver keyserver.ubuntu.com with --keyserver hkp://keyserver.ubuntu.com:80 avoided the problem for me.

3 Likes