Database Machine

I have tried to bring up the database machine using vagrant up , following all instructions but it always has a problem installing mongo. I am unable to work on my labs due to this. Please help me solve this problem

============= Vagrant LOG during provisioning=================
Cleaning up downloaded VirtualBox Guest Additions ISO…
==> database: Checking for guest additions in VM…
==> database: Setting hostname…
==> database: Configuring and enabling network interfaces…
==> database: Mounting shared folders…
database: /vagrant => /home/omar/Documents/MongoDB/M310-MongoDB_Security/m310-vagrant-env
database: /home/vagrant/shared => /home/omar/Documents/MongoDB/M310-MongoDB_Security/m310-vagrant-env/shared
==> database: Running provisioner: shell…
database: Running: /tmp/vagrant-shell20190919-887-h2m1gz
database: + config_hosts
database: + echo ‘Configuring /etc/hosts …’
database: Configuring /etc/hosts …
database: + echo ‘ database’
database: + echo ‘ infrastructure’
database: + update_repo
database: + echo ‘Install MongoDB Enterprise Repository’
database: Install MongoDB Enterprise Repository
database: + tee /etc/apt/sources.list.d/mongodb-enterprise.list
database: ++ lsb_release -sc
database: + echo ‘deb trusty/mongodb-enterprise/3.2 multiverse’
database: deb trusty/mongodb-enterprise/3.2 multiverse
database: + apt-key adv --keyserver hkp:// --recv EA312927
database: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.7HpCHt03zZ --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp:// --recv EA312927
database: gpg:
database: requesting key EA312927 from hkp server
database: gpg:
database: key EA312927: public key “Totally Legit Signing Key” imported
database: gpg:
database: Total number processed: 1
database: gpg:
database: imported: 1
database: (RSA: 1)
database: + echo ‘Update Repositoryies’
database: Update Repositoryies
database: + apt-get update -y
database: Ign trusty InRelease
database: Get:1 trusty-security InRelease [65.9 kB]
database: Ign trusty/mongodb-enterprise/3.2 InRelease
database: Get:2 trusty-updates InRelease [65.9 kB]
database: Get:3 trusty/mongodb-enterprise/3.2 Release.gpg [801 B]
database: Get:4 trusty/mongodb-enterprise/3.2 Release [3,955 B]
database: Ign trusty/mongodb-enterprise/3.2 Release
database: Hit trusty-backports InRelease
database: Get:5 trusty-security/main Sources [172 kB]
database: Hit trusty Release.gpg
database: Get:6 trusty-updates/main Sources [431 kB]
database: Get:7 trusty-updates/restricted Sources [6,313 B]
database: Get:8 trusty-security/universe Sources [102 kB]
database: Get:9 trusty/mongodb-enterprise/3.2/multiverse amd64 Packages [15.5 kB]
database: Get:10 trusty-updates/universe Sources [231 kB]
database: Get:11 trusty-security/main amd64 Packages [835 kB]
database: Ign trusty/mongodb-enterprise/3.2/multiverse Translation-en_US
database: Ign trusty/mongodb-enterprise/3.2/multiverse Translation-en
database: Get:12 trusty-updates/multiverse Sources [7,535 B]
database: Get:13 trusty-updates/main amd64 Packages [1,178 kB]
database: Get:14 trusty-security/universe amd64 Packages [294 kB]
database: Get:15 trusty-updates/restricted amd64 Packages [17.2 kB]
database: Get:16 trusty-updates/universe amd64 Packages [526 kB]
database: Get:17 trusty-updates/multiverse amd64 Packages [14.6 kB]
database: Get:18 trusty-security/main Translation-en [448 kB]
database: Get:19 trusty-updates/main Translation-en [582 kB]
database: Get:20 trusty-updates/multiverse Translation-en [7,616 B]
database: Get:21 trusty-security/universe Translation-en [162 kB]
database: Get:22 trusty-updates/restricted Translation-en [4,028 B]
database: Get:23 trusty-updates/universe Translation-en [281 kB]
database: Get:24 trusty-backports/main Sources [9,709 B]
database: Get:25 trusty-backports/restricted Sources [28 B]
database: Get:26 trusty-backports/universe Sources [35.4 kB]
database: Get:27 trusty-backports/multiverse Sources [1,896 B]
database: Hit trusty-backports/main amd64 Packages
database: Hit trusty-backports/restricted amd64 Packages
database: Hit trusty-backports/universe amd64 Packages
database: Hit trusty-backports/multiverse amd64 Packages
database: Hit trusty-backports/main Translation-en
database: Hit trusty-backports/multiverse Translation-en
database: Hit trusty-backports/restricted Translation-en
database: Hit trusty-backports/universe Translation-en
database: Hit trusty Release
database: Get:28 trusty/main Sources [1,064 kB]
database: Get:29 trusty/restricted Sources [5,433 B]
database: Get:30 trusty/universe Sources [6,399 kB]
database: Get:31 trusty/multiverse Sources [174 kB]
database: Hit trusty/main amd64 Packages
database: Hit trusty/restricted amd64 Packages
database: Hit trusty/universe amd64 Packages
database: Hit trusty/multiverse amd64 Packages
database: Hit trusty/main Translation-en
database: Hit trusty/multiverse Translation-en
database: Hit trusty/restricted Translation-en
database: Hit trusty/universe Translation-en
database: Ign trusty/main Translation-en_US
database: Ign trusty/multiverse Translation-en_US
database: Ign trusty/restricted Translation-en_US
database: Ign trusty/universe Translation-en_US
database: Fetched 13.1 MB in 50s (259 kB/s)
database: Reading package lists…
database: W
database: :
database: GPG error: trusty/mongodb-enterprise/3.2 Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY D68FA50FEA312927
database: + install_mongod
database: + echo ‘Install MongoDB Enterprise’
database: Install MongoDB Enterprise
database: + apt-get install -y mongodb-enterprise
database: Reading package lists…
database: Building dependency tree…
database: Reading state information…
database: The following packages were automatically installed and are no longer required:
database: acl at-spi2-core colord dconf-gsettings-backend dconf-service fontconfig
database: fontconfig-config fonts-dejavu-core hicolor-icon-theme libasound2
database: libasound2-data libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data libatspi2.0-0
database: libavahi-client3 libavahi-common-data libavahi-common3 libcairo-gobject2
database: libcairo2 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra0 libcolord1
database: libcolorhug1 libcups2 libdatrie1 libdconf1 libdrm-intel1 libdrm-nouveau2
database: libdrm-radeon1 libexif12 libfontconfig1 libfontenc1 libgd3
database: libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx
database: libglapi-mesa libgphoto2-6 libgphoto2-l10n libgphoto2-port10 libgraphite2-3
database: libgtk-3-0 libgtk-3-bin libgtk-3-common libgudev-1.0-0 libgusb2
database: libharfbuzz0b libice6 libieee1284-3 libjasper1 libjbig0 libjpeg-turbo8
database: libjpeg8 liblcms2-2 libllvm3.4 libltdl7 libnotify-bin libnotify4 libogg0
database: libpango-1.0-0 libpangocairo-1.0-0 libpangoft2-1.0-0 libpciaccess0
database: libpixman-1-0 libsane libsane-common libsm6 libtdb1 libthai-data libthai0
database: libtiff5 libtxc-dxtn-s2tc0 libv4l-0 libv4lconvert0 libvorbis0a
database: libvorbisfile3 libvpx1 libwayland-client0 libwayland-cursor0 libx11-xcb1
database: libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0
database: libxcb-render0 libxcb-shm0 libxcb-sync1 libxcomposite1 libxcursor1
database: libxdamage1 libxfixes3 libxfont1 libxi6 libxinerama1 libxkbcommon0
database: libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxt6
database: libxtst6 libxxf86vm1 notification-daemon sound-theme-freedesktop x11-common
database: x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xserver-common
database: xserver-xorg-core
database: Use ‘apt-get autoremove’ to remove them.
database: The following extra packages will be installed:
database: libperl5.18 libsensors4 libsnmp-base libsnmp30 mongodb-enterprise-mongos
database: mongodb-enterprise-server mongodb-enterprise-shell mongodb-enterprise-tools
database: snmp
database: Suggested packages:
database: lm-sensors snmp-mibs-downloader
database: The following NEW packages will be installed:
database: libperl5.18 libsensors4 libsnmp-base libsnmp30 mongodb-enterprise
database: mongodb-enterprise-mongos mongodb-enterprise-server mongodb-enterprise-shell
database: mongodb-enterprise-tools snmp
database: 0 upgraded, 10 newly installed, 0 to remove and 1 not upgraded.
database: Need to get 54.2 MB of archives.
database: After this operation, 225 MB of additional disk space will be used.
database: WARNING: The following packages cannot be authenticated!
database: mongodb-enterprise-shell mongodb-enterprise-server mongodb-enterprise-mongos
database: mongodb-enterprise-tools mongodb-enterprise
database: E
database: :
database: There are problems and -y was used without --force-yes
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.

1 Like

Same error message with @Omar_29984

Hi @007_jb @Omar_29984,

Please try the following suggestion in the below post:

You can modify this line under provision-database
apt-get install -y mongodb-enterprise
to apt-get install -y mongodb-enterprise --force-yes



Thank you @Kanika that has resolved the issue. :+1:

apt-get install -y mongodb-enterprise --force-yes

For the benefit of everyone, can you please explain why the --force-yes option is required here? And if this is an acceptable solution, why isn’t it already included in the curriculum file or explained in the Installation Troubleshooting Notes?

My understanding is that the --force-yes option is working in tandem with the -y option. I.e. when the NO_PUBKEY D68FA50FEA312927 warning is encountered, -y will give a yes signal and --force-yes will ignore the warning and go ahead with the installation.

Thanks @Kanika . The Solution indeed Worked for me. Please update the lecture “Installing Vagrant”, so new students know how resolve this issue :smile:

Hi @Omar_29984,

Surely. :slight_smile: We are in process of updating the Troubleshooting guide.