Issue with setting Up the Vagrant Environment

I tried using vagrant up --provision command on windows and get below error after getting so many packages:

mongod-m103: Ign trusty/restricted Translation-en_US
mongod-m103: Ign trusty/universe Translation-en_US
mongod-m103: Fetched 9,049 kB in 1h 35min 32s (1,578 B/s)
mongod-m103: W
mongod-m103: :
mongod-m103: GPG error: trusty/mongodb-enterprise/3.6 Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 58712A2291FA4AD5
mongod-m103: W
mongod-m103: :
mongod-m103: Failed to fetch Hash Sum mismatch
mongod-m103: W
mongod-m103: :
mongod-m103: Failed to fetch Hash Sum mismatch
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.

Yours is the second or third case where I’ve seen APT complain about problems with the MongoDB repositories. I’ve already pinged @DHz @nathan.leniz and @Kanika; hopefully they can provide info soon.

Hi Folks…

Just to clarify: while I’m happy to help where I can, I’m not the TA for M103 – I work on M121, M201, M310 & M312 – so I’m not going to see these posts. And I really don’t know anything about the M103 provisioning issues. @ Tess_Sluijter if you think this is an issue, then I’d suggest using the “Report an issue” tab and let the curriculum team look into it.

So far as I can tell for my classes, everything works fine. FWIW.

Thanks for the feedback @DHz. I’ll try that as well yeah.

Thing is, this isn’t necessarily an issue with the labs, but could potentially be an issue with the production APT repositories of MongoDB.

Report made.

I would suggest other students to follow suit.

@Tess_Sluijter I did the same yesterday and yet waiting to hear from any support team on the same.

1 Like

–Just a reminder…

It is a Sunday and tomorrow is a holiday in the US. So this may not get a response immediately.

I don’t think this is a general problem with the APT repositories – I just ran a system update on several of the servers I manage and everything worked fine – but it may be a problem with the keys – I’ve run into that once or twice on my own systems. Anyway, we’ll let the dev team look into this and I expect they’ll get back you. Good luck.


Hi Ankit_85713,

@DHz is right. You need to update the system. I am not pro in solving these vagrant issues.

But here is something that worked for some people:


1 Like

Thanks @Kanika
Actually, the solution ask to perform the apt-get update by sudo but i’m running docker in windows and using powershell to execute the command where sudo is not recognised because its linux based command. Any clue how i can get rid of this issue. Just need to complete the course followed by this setup. Am i missing anything here?

Within the Docker container you should be able to run sudo if it’s a linux image. A 64 bit debian version is required for the course, as the validators are compiled for this environment.

1 Like

I haven’t learned much about docker yet, but I recall that by definition the container OS is the same as the host OS. If I understood correctly there is no such thing as a “Linux container” running on Windows.

Hence, if you need a full Linux OS/env on a Windows box, you’ll need to run a full blown VM.

You can get different images. Centos, Ubuntu, Arch, etc… The base architecture layer must be host OS compatible in order to orchestrate all the resource sharing that containers provide, but that layer isn’t ever directly interacted with.

On my windows computer at home I’ve recently spun up an ubuntu image for a personal project.

I will have to look deeper into that, thanks for the link. I still have some ideas about how this would work, which probably are incorrect. So I will need to investigate.


i tried running sudo apt-get update on windows 8.1 command prompt but got this issue
sudo is not recognised as an internal or external command

Well yeah, both sudo and apt are Linux commands :slight_smile:

yea, i figured. i downloaded choco for for windows but don’t know how to use it to do the same function as sudo apt-get update. meanwhile, i downloaded the validation files but when i run validate_box, it gives me the same error message (validate_box is not an external or internal command)

I’m sorry, but you’re confusing me quite a bit with the commands you’re throwing left and right :slight_smile:

  • Chocolatey is a package manager for Windows, you use it to manage software on your Windows computer.
  • apt-get update is a command used to update the package information cache for the APT package manager. It does not change anything on the computer in question.
  • The validation files go into the Ubuntu Linux virtual machine, they’re not used on the Windows host.
  • The validate_box command is ran from the Linux command line, not on Windows, nor inside the Mongo shell.

okay @Tess_Sluijter
i went into all this because i cant seem to solve the error message while running vagrant up `C:\Users\Eugenia Emeka-Okafor\Documents\MONGODB\BASIC CLUSTER ADMINISTRATION\Uni
versity\m103\m103-vagrant-env>vagrant up --provision
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Importing base box ‘ubuntu/trusty64’…
==> mongod-m103: Matching MAC address for NAT networking…
==> mongod-m103: Setting the name of the VM: mongod-m1033
==> mongod-m103: Clearing any previously set forwarded ports…
==> mongod-m103: Fixed port collision for 22 => 2222. Now on port 2200.
==> mongod-m103: Clearing any previously set network interfaces…
==> mongod-m103: Preparing network interfaces based on configuration…
mongod-m103: Adapter 1: nat
mongod-m103: Adapter 2: hostonly
==> mongod-m103: Forwarding ports…
mongod-m103: 22 (guest) => 2200 (host) (adapter 1)
==> mongod-m103: Running ‘pre-boot’ VM customizations…
==> mongod-m103: Booting VM…
==> mongod-m103: Waiting for machine to boot. This may take a few minutes…
mongod-m103: SSH address:
mongod-m103: SSH username: vagrant
mongod-m103: SSH auth method: private key
mongod-m103: Warning: Connection aborted. Retrying…
mongod-m103: Warning: Connection aborted. Retrying…
mongod-m103: Warning: Connection aborted. Retrying…
mongod-m103: Vagrant insecure key detected. Vagrant will automatically repla
mongod-m103: this with a newly generated keypair for better security.
mongod-m103: Inserting generated public key within guest…
==> mongod-m103: Machine booted and ready!
==> mongod-m103: Checking for guest additions in VM…
mongod-m103: The guest additions on this VM do not match the installed versi
on of
mongod-m103: VirtualBox! In most cases this is fine, but in rare cases it ca
mongod-m103: prevent things such as shared folders from working properly. If
you see
mongod-m103: shared folder errors, please make sure the guest additions with
in the
mongod-m103: virtual machine match the version of VirtualBox you have instal
led on
mongod-m103: your host and reload your VM.
mongod-m103: Guest Additions Version: 4.3.36
mongod-m103: VirtualBox Version: 6.0
==> mongod-m103: Setting hostname…
==> mongod-m103: Configuring and enabling network interfaces…
==> mongod-m103: Mounting shared folders…
mongod-m103: /shared => C:/Users/Eugenia Emeka-Okafor/Documents/MONGODB/BASI
C CLUSTER ADMINISTRATION/University/m103/m103-vagrant-env/shared
mongod-m103: /vagrant => C:/Users/Eugenia Emeka-Okafor/Documents/MONGODB/BAS
IC CLUSTER ADMINISTRATION/University/m103/m103-vagrant-env
mongod-m103: /dataset => C:/Users/Eugenia Emeka-Okafor/Documents/MONGODB/BAS
IC CLUSTER ADMINISTRATION/University/m103/m103-vagrant-env/dataset
==> mongod-m103: Running provisioner: shell…
mongod-m103: Running: C:/Users/EUGENI~1/AppData/Local/Temp/vagrant-shell2019
mongod-m103: + config
mongod-m103: + sudo su
mongod-m103: + echo -e never
mongod-m103: + echo -e never
mongod-m103: + echo manual
mongod-m103: + sudo tee /etc/init/mongod.override
mongod-m103: manual
mongod-m103: + ip_config
mongod-m103: ++ ifconfig
mongod-m103: ++ cut -d: -f2
mongod-m103: ++ grep -v
mongod-m103: ++ awk ‘{ print $1}’
mongod-m103: ++ grep ‘inet addr:’
mongod-m103: ++ tail -1
mongod-m103: + export CLIENT_IP_ADDR=
mongod-m103: + CLIENT_IP_ADDR=
mongod-m103: ++ hostname
mongod-m103: + export CLIENT_FQDN=m103
mongod-m103: + CLIENT_FQDN=m103
mongod-m103: ++ hostname
mongod-m103: ++ tr ‘[:upper:]’ ‘[:lower:]’
mongod-m103: ++ cut -d. -f 1
mongod-m103: + export CLIENT_NAME=m103
mongod-m103: + CLIENT_NAME=m103
mongod-m103: + echo ‘Configuring /etc/hosts …’
mongod-m103: Configuring /etc/hosts …
mongod-m103: + echo ' localhost localhost.localdomain localhost4 lo
calhost4.localdomain4 ’
mongod-m103: + echo ‘::1 localhost localhost.localdomain localhost6 lo
mongod-m103: + echo ‘fe00::0 ip6-localnet’
mongod-m103: + echo ‘ff00::0 ip6-mcastprefix’
mongod-m103: + echo ‘ff02::1 ip6-allnodes’
mongod-m103: Install MongoDB Enterprise Repository
mongod-m103: + echo ‘ff02::2 ip6-allrouters’
mongod-m103: + echo ‘ff02::3 ip6-allhosts’
mongod-m103: + echo ‘ m103 m103’
mongod-m103: + update_repo
mongod-m103: + echo ‘Install MongoDB Enterprise Repository’
mongod-m103: + echo ‘deb [ arch=amd64 ] t
rusty/mongodb-enterprise/3.6 multiverse’
mongod-m103: + sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
mongod-m103: deb [ arch=amd64 ] trusty/mo
ngodb-enterprise/3.6 multiverse
mongod-m103: + sudo apt-key adv --keyserver hkp:// –
recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5
mongod-m103: Executing: gpg --ignore-time-conflict --no-options --no-default
-keyring --homedir /tmp/tmp.TG4T1LO6Pf --no-auto-check-trustdb --trust-model alw
ays --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keys
erver hkp:// --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4
mongod-m103: gpg:
mongod-m103: requesting key 91FA4AD5 from hkp server
mongod-m103: gpg:
mongod-m103: key 91FA4AD5: public key “MongoDB 3.6 Release Signing Key <pack>” imported
mongod-m103: gpg:
mongod-m103: Total number processed: 1
mongod-m103: gpg:
mongod-m103: imported: 1
mongod-m103: (RSA: 1)
mongod-m103: + echo ‘Update Repositories’
mongod-m103: Update Repositories
mongod-m103: + sudo apt-get update -y
mongod-m103: Get:1 trusty InRelease [235 B]
mongod-m103: Splitting up /var/lib/apt/lists/partial/archive.ubuntu.com_ubun
tu_dists_trusty_InRelease into data and signature failed
mongod-m103: Ign trusty InRelease
mongod-m103: E
mongod-m103: :
mongod-m103: GPG error: trusty InRelease: Clearsig
ned file isn’t valid, got ‘NODATA’ (does the network require authentication?)
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.

C:\Users\Eugenia Emeka-Okafor\Documents\MONGODB\BASIC CLUSTER ADMINISTRATION\Uni


Right’o… The only error occuring is this one here:

The rest looks perfectly fine.

Looks like the VM cannot properly access the Ubuntu archives. Is there perhaps a proxy server, or some other network security device that’s shielding your network from the Internet? Funnily enough the Vagrant scripts did manage to grab the PGP key from the Ubuntu servers.

1 Like

i tried to remove network security device shielding my network and tried running vagrant up again and got this

after removing the security blockages, i re-ran vagrant up and it worked

1 Like