Failed sudo apt-get update -y

In function update_repo() the command sudo apt-get update -y failed:

Get:41 http://archive.ubuntu.com trusty/universe Sources [6,399 kB]
Ign https://esm.ubuntu.com trusty-infra-updates/main Translation-en
Err https://esm.ubuntu.com trusty-infra-security/main amd64 Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Err https://esm.ubuntu.com trusty-infra-updates/main amd64 Packages
server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
Get:42 http://archive.ubuntu.com trusty/multiverse Sources [174 kB]
Get:43 http://archive.ubuntu.com trusty/main amd64 Packages [1,350 kB]
Get:44 http://archive.ubuntu.com trusty/restricted amd64 Packages [13.0 kB]
Get:45 http://archive.ubuntu.com trusty/universe amd64 Packages [5,859 kB]
Get:46 http://archive.ubuntu.com trusty/multiverse amd64 Packages [132 kB]
Get:47 http://archive.ubuntu.com trusty/main Translation-en [762 kB]
Get:48 http://archive.ubuntu.com trusty/multiverse Translation-en [102 kB]
Get:49 http://archive.ubuntu.com trusty/restricted Translation-en [3,457 B]
Get:50 http://archive.ubuntu.com trusty/universe Translation-en [4,089 kB]
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Fetched 25.7 MB in 57s (447 kB/s)
W: GPG error: http://repo.mongodb.com trusty/mongodb-enterprise/3.6 Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 58712A2291FA4AD5
W: Failed to fetch https://esm.ubuntu.com/ubuntu/dists/trusty-infra-security/main/binary-amd64/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

W: Failed to fetch https://esm.ubuntu.com/ubuntu/dists/trusty-infra-updates/main/binary-amd64/Packages server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

E: Some index files failed to download. They have been ignored, or old ones used instead.

Hi @Francisco_Manoel_da_Silva_27618,

PLease check for firewall/anti-virus.

If these are already disabled, please try and replace the following line(57) in provision-mongod file:

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

with the following line:

 sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

Once you have done this, please try to re-provision the box and let us know how it goes.

Thanks,
Muskan

Hi,

I have done all this but still have issues bringing up the box.
It goes further, but still stuck at update repos.

    mongod-m103: Err https://esm.ubuntu.com trusty-infra-security/main amd64 Packages
mongod-m103:   server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
mongod-m103: Err https://esm.ubuntu.com trusty-infra-updates/main amd64 Packages
mongod-m103:   server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
mongod-m103: W
mongod-m103: :
mongod-m103: Failed to fetch https://esm.ubuntu.com/ubuntu/dists/trusty-infra-security/main/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
mongod-m103: W
mongod-m103: :
mongod-m103: Failed to fetch https://esm.ubuntu.com/ubuntu/dists/trusty-infra-updates/main/binary-amd64/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
mongod-m103: E
mongod-m103: :
mongod-m103: Some index files failed to download. They have been ignored, or old ones used instead.

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.

Hi @Kristof_98641,

Can you please share the section of provision-mongod file where you have replaced the key?

Also, after replacing that did you re-provision your vagrant as below?

vagrant halt
vagrant destroy
vagrant up --provision

The issue most probably seems to be with some kind of security mechanisms(proxy/firewall/anti-virus) only as the error message clearly displays SSL/certificates error.

If you are using your work computer and might not be able to pass through these security walls, we would recommend you to try using your personal computer/home network once and see if it works.

Thanks,
Muskan

Hi, I changed it in the uodate_repo() fucntion

function update_repo(){
echo "Install MongoDB Enterprise Repository"
# set to track mongodb development (rc)
echo "deb [ arch=amd64 ] http://repo.mongodb.com/apt/ubuntu trusty/mongodb-enterprise/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
#sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 0C49F3730359A14518585931BC711F9BA15703C6
#sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5

Can you provide me with the access I would need to have (ports) in order to request the FW access at the office?

I will try to work on this at home on my personal pc if nothing works.