Vagrant ssh malfunction

After connecting to my Vagrant instance using SSH when I want it to list, it can not reach “data” file, and later comands "vagrant@m103:~ ls ", "vagrant@m103:~ mongod –version ", do not work, can not see mongod. I missed my assigment due but just the same want to learn eagerly. Thanks in advance.

Did you do vagrant up --provision from the windows prompt?

What was the output of validate_box at the vagrant prompt?

Hi, steevej-1495
C:\Users\mus\mongodb\university\m103\m103-vagrant-env>vagrant up --provision
Bringing machine ‘mongod-m103’ up with ‘virtualbox’ provider…
==> mongod-m103: Clearing any previously set forwarded ports…
==> 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) => 2222 (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 reset. Retrying…
mongod-m103: Warning: Remote connection disconnect. Retrying…
mongod-m103: Warning: Connection aborted. Retrying…
==> 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 version of
mongod-m103: VirtualBox! In most cases this is fine, but in rare cases it can
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 within the
mongod-m103: virtual machine match the version of VirtualBox you have installed 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/mus/mongodb/university/m103/m103-vagrant-env/shared
mongod-m103: /vagrant => C:/Users/mus/mongodb/university/m103/m103-vagrant-env
mongod-m103: /dataset => C:/Users/mus/mongodb/university/m103/m103-vagrant-env/dataset
==> mongod-m103: Running provisioner: shell…
mongod-m103: Running: C:/Users/mus/AppData/Local/Temp/vagrant-shell20190118-5080-19p7ts7
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: ++ grep ‘inet addr:’
mongod-m103: ++ ifconfig
mongod-m103: ++ tail -1
mongod-m103: ++ cut -d: -f2
mongod-m103: ++ grep -v
mongod-m103: ++ awk ‘{ print $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: ++ cut -d. -f 1
mongod-m103: ++ tr ‘[:upper:]’ ‘[:lower:]’
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 localhost4.localdomain4 ’
mongod-m103: + echo ‘::1 localhost localhost.localdomain localhost6 localhost6.localdomain6’
mongod-m103: + echo ‘fe00::0 ip6-localnet’
mongod-m103: + echo ‘ff00::0 ip6-mcastprefix’
mongod-m103: + echo ‘ff02::1 ip6-allnodes’
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: Install MongoDB Enterprise Repository
mongod-m103: + echo ‘deb [ arch=amd64 ] trusty/mongodb-enterprise/3.6 multiverse’
mongod-m103: + sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list
mongod-m103: deb [ arch=amd64 ] trusty/mongodb-enterprise/3.6 multiverse
mongod-m103: + sudo apt-key adv --keyserver hkp:// --recv 0C49F3730359A14518585931BC711F9BA15703C6
mongod-m103: Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --homedir /tmp/tmp.P2layLHoBa --no-auto-check-trustdb --trust-model always --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver hkp:// --recv 0C49F3730359A14518585931BC711F9BA15703C6
mongod-m103: gpg:
mongod-m103: requesting key A15703C6 from hkp server
mongod-m103: ?: Host not found
mongod-m103: gpgkeys: HTTP fetch error 7: couldn’t connect: Success
mongod-m103: gpg:
mongod-m103: no valid OpenPGP data found.
mongod-m103: gpg:
mongod-m103: 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.

vagrant@m103:~$ validate_box
validate_box: command not found

I just ping’ed and everything was fine.

Must be a VPN or firewall issue. Can you open a browser to

I think I opened a browser.

SKS OpenPGP Key server

So in Windows you can find the key server. Nice. The only thing I could think is to retry the vagrant up --provision in case you had connectivity issue at the time. If that does not work, then somebody else will have to participate because that’s outside my capabilities.

Thank you Steeve. I hope ıt works.

Hi Mustafa,

Have you got resolution for your problem as I have same problem?

Appreciate your response.



Hi, Vivek,
Unfortunately, it is still my headache. I missed the due time for m040 and m103 because of this problem.There can be another problem. I wonder where(in which directory) the “data” file that appears after "vagrant@m103:~$ ls " I will not give up. Bye for now
Hi, again. last time I removed every thing from the virtual boxbefore turning my computer off. A little while ago I started the command promt
C:\Users\mus\mongodb\university\m103\m103-vagrant-env>vagrant up
Here I noticed It loaded Pymongo, so
C:\Users\mus\mongodb\university\m103\m103-vagrant-env>vagrant ssh
and I got it for now. It works;

vagrant@m103:~ ls ------------data----------- vagrant@m103:~ validate_box