Chapter 0: Introduction & Setup problems

OS: Windows 10
VirtualBox 6.0
Vagrant 2.2.3

After the command vagrant up --provision, it hangs at mongod-m103: SSH auth method: private key for about 3 minutes:

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-m103
==> 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: 127.0.0.1:2222
    mongod-m103: SSH username: vagrant
    mongod-m103: SSH auth method: private key

then it continues with this error message.

Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured ("config.vm.boot_timeout" value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

(Note: there are no error messages ‘above’)

If you're using a custom box, make sure that networking is properly
working and you're able to connect to the machine. It is a common
problem that networking isn't setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout ("config.vm.boot_timeout") value.

So, there are a number of directions, here. One appears to be that I have to find my ssh installation and uninstall it? Or possibly find out what the default config.vm.boot_timeout value is, and increase it?

I have been at this for hours, and progress is slow. Vagrant + VirtualBox was supposed to make things easier for students, but this has not been my experience. And, since it appears to be mandatory for the course, I may need to unregister at some point.

https://www.vagrantup.com/docs/vagrantfile/machine_settings.html#config-vm-boot_timeout looks like according to that doc its 300 seconds. On why older IMac it took awhile to boot but did eventually without changing the default. I think you can set it in the vagrantfile near the other config.vm.* properties.

HTH,
Mike

1 Like

I really appreciate your help, @Mike_67094. I boosted it to 1000 and, after over 15 minutes, I still got a timeout. I’m going to assume that the time out isn’t the problem.

Perhaps the ssh is incompatible somehow. I am upgrading it, and I’ll see if that fixes it.

Otherwise I may unregister and try again when the course is updated. This appears to be the only course where it’s a requirement.

I should also install a Linux dual-boot. I’m pretty sure all of this would be much easier in, say, Ubuntu.

1 Like

I’m going to try to continue the course without using Vagrant + VirtualBox. I will let everyone know how it goes!

You can try using

vagrant up --debug

–debug gives more informations

1 Like

Thank you @Arun_06105!

It certainly does give me a lot of information! It appears to be stuck in some kind of loop. This message keeps repeating over and over until the timeout.

...
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
DEBUG virtualbox_6_0:   - [1, "ssh", 2200, 22, "127.0.0.1"]
 INFO ssh: Attempting SSH connection...
 INFO ssh: Attempting to connect to SSH...
 INFO ssh:   - Host: 127.0.0.1
 INFO ssh:   - Port: 2200
 INFO ssh:   - Username: vagrant
 INFO ssh:   - Password? false
 INFO ssh:   - Key Path: ["C:/Users/renda/.vagrant.d/insecure_private_key"]
DEBUG ssh:   - connect_opts: {:auth_methods=>["none", "hostbased", "publickey"], :config=>false, :forward_agent=>false, :send_env=>false, :keys_only=>true, :verify_host_key=>:never, :password=>nil, :port=>2200, :timeout=>15, :user_known_hosts_file=>[], :verbose=>:debug, :encryption=>["aes256-ctr", "aes192-ctr", "aes128-ctr", "aes256-cbc", "aes192-cbc", "aes128-cbc", "rijndael-cbc@lysator.liu.se", "blowfish-ctr", "blowfish-cbc", "cast128-ctr", "cast128-cbc", "3des-ctr", "3des-cbc", "idea-cbc", "arcfour256", "arcfour128", "arcfour", "none"], :logger=>#<Logger:0x0000000005cd7288 @level=0, @progname=nil, @default_formatter=#<Logger::Formatter:0x0000000005cd7238 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x0000000005cd71e8 @shift_period_suffix=nil, @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<StringIO:0x0000000005cd72d8>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x0000000005cd7198>>>, :keys=>["C:/Users/renda/.vagrant.d/insecure_private_key"], :remote_user=>"vagrant"}
 INFO subprocess: Starting process: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo", "9f5f2384-08f2-4903-8cbc-6e869c0daf36", "--machinereadable"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: name="mongod-m103"
groups="/"
ostype="Ubuntu (64-bit)"
UUID="9f5f2384-08f2-4903-8cbc-6e869c0daf36"
CfgFile="C:\\Users\\renda\\VirtualBox VMs\\mongod-m103\\mongod-m103.vbox"
SnapFldr="C:\\Users\\renda\\VirtualBox VMs\\mongod-m103\\Snapshots"
LogFldr="C:\\Users\\renda\\VirtualBox VMs\\mongod-m103\\Logs"
hardwareuuid="9f5f2384-08f2-4903-8cbc-6e869c0daf36"
memory=2048
pagefusion="off"
vram=12
cpuexecutioncap=100
hpet="off"
cpu-profile="host"
chipset="piix3"
firmware="BIOS"
cpus=2
pae="off"
longmode="on"
triplefaultreset="off"
apic="on"
x2apic="off"
nested-hw-virt="off"
cpuid-portability-level=0
bootmenu="messageandmenu"
boot1="disk"
boot2="none"
boot3="none"
boot4="none"
acpi="on"
ioapic="on"
biosapic="apic"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="off"
vtxvpid="on"
vtxux="on"
paravirtprovider="legacy"
effparavirtprovider="none"
VMState="running"
VMStateChangeTime="2019-01-12T23:46:49.774000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATAController"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="1"
storagecontrollerbootable0="on"
"SATAController-0-0"="C:\Users\renda\VirtualBox VMs\ubuntu-cloudimg-trusty-vagrant-amd64\box-disk1.vmdk"
"SATAController-ImageUUID-0-0"="7776a565-4a32-44db-bafc-4443d81cc818"
natnet1="nat"
macaddress1="080027844509"
cableconnected1="on"
nic1="nat"
nictype1="82540EM"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
Forwarding(0)="ssh,tcp,127.0.0.1,2200,,22"
hostonlyadapter2="VirtualBox Host-Only Ethernet Adapter #2"
macaddress2="080027EBBB73"
cableconnected2="on"
nic2="hostonly"
nictype2="82540EM"
nicspeed2="0"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
uart3="off"
uart4="off"
lpt1="off"
lpt2="off"
audio="none"
audio_in="on"
audio_out="on"
clipboard="disabled"
draganddrop="disabled"
SessionName="headless"
VideoMode="720,400,0"@0,0 1
vrde="off"
usb="off"
ehci="off"
xhci="off"
SharedFolderNameMachineMapping1="shared"
SharedFolderPathMachineMapping1="\\\\?\\C:\\workspace\\courses\\mongodb\\m103\\m103-vagrant-env\\shared"
SharedFolderNameMachineMapping2="dataset"
SharedFolderPathMachineMapping2="\\\\?\\C:\\workspace\\courses\\mongodb\\m103\\m103-vagrant-env\\dataset"
SharedFolderNameMachineMapping3="vagrant"
SharedFolderPathMachineMapping3="\\\\?\\C:\\workspace\\courses\\mongodb\\m103\\m103-vagrant-env"
VRDEActiveConnection="off"
VRDEClients==0
videocap="off"
videocapaudio="off"
capturescreens="0"
capturefilename="C:\\Users\\renda\\VirtualBox VMs\\ubuntu-cloudimg-trusty-vagrant-amd64_1547336789347_34867\\ubuntu-cloudimg-trusty-vagrant-amd64_1547336789347_34867.webm"
captureres="1024x768"
capturevideorate=512
capturevideofps=25
captureopts=""
GuestMemoryBalloon=0
GuestOSType="Ubuntu_64"
GuestAdditionsRunLevel=0
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
 INFO subprocess: Starting process: ["C:/Program Files/Oracle/VirtualBox/VBoxManage.exe", "showvminfo", "9f5f2384-08f2-4903-8cbc-6e869c0daf36", "--machinereadable"]
 INFO subprocess: Command not in installer, restoring original environment...
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stdout: name="mongod-m103"
groups="/"
ostype="Ubuntu (64-bit)"
UUID="9f5f2384-08f2-4903-8cbc-6e869c0daf36"
CfgFile="C:\\Users\\renda\\VirtualBox VMs\\mongod-m103\\mongod-m103.vbox"
SnapFldr="C:\\Users\\renda\\VirtualBox VMs\\mongod-m103\\Snapshots"
LogFldr="C:\\Users\\renda\\VirtualBox VMs\\mongod-m103\\Logs"
hardwareuuid="9f5f2384-08f2-4903-8cbc-6e869c0daf36"
memory=2048
pagefusion="off"
vram=12
cpuexecutioncap=100
hpet="off"
cpu-profile="host"
chipset="piix3"
firmware="BIOS"
cpus=2
pae="off"
longmode="on"
triplefaultreset="off"
apic="on"
x2apic="off"
nested-hw-virt="off"
cpuid-portability-level=0
bootmenu="messageandmenu"
boot1="disk"
boot2="none"
boot3="none"
boot4="none"
acpi="on"
ioapic="on"
biosapic="apic"
biossystemtimeoffset=0
rtcuseutc="on"
hwvirtex="on"
nestedpaging="on"
largepages="off"
vtxvpid="on"
vtxux="on"
paravirtprovider="legacy"
effparavirtprovider="none"
VMState="running"
VMStateChangeTime="2019-01-12T23:46:49.774000000"
monitorcount=1
accelerate3d="off"
accelerate2dvideo="off"
teleporterenabled="off"
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
defaultfrontend=""
storagecontrollername0="SATAController"
storagecontrollertype0="IntelAhci"
storagecontrollerinstance0="0"
storagecontrollermaxportcount0="30"
storagecontrollerportcount0="1"
storagecontrollerbootable0="on"
"SATAController-0-0"="C:\Users\renda\VirtualBox VMs\ubuntu-cloudimg-trusty-vagrant-amd64\box-disk1.vmdk"
"SATAController-ImageUUID-0-0"="7776a565-4a32-44db-bafc-4443d81cc818"
natnet1="nat"
macaddress1="080027844509"
cableconnected1="on"
nic1="nat"
nictype1="82540EM"
nicspeed1="0"
mtu="0"
sockSnd="64"
sockRcv="64"
tcpWndSnd="64"
tcpWndRcv="64"
Forwarding(0)="ssh,tcp,127.0.0.1,2200,,22"
hostonlyadapter2="VirtualBox Host-Only Ethernet Adapter #2"
macaddress2="080027EBBB73"
cableconnected2="on"
nic2="hostonly"
nictype2="82540EM"
nicspeed2="0"
nic3="none"
nic4="none"
nic5="none"
nic6="none"
nic7="none"
nic8="none"
hidpointing="ps2mouse"
hidkeyboard="ps2kbd"
uart1="off"
uart2="off"
uart3="off"
uart4="off"
lpt1="off"
lpt2="off"
audio="none"
audio_in="on"
audio_out="on"
clipboard="disabled"
draganddrop="disabled"
SessionName="headless"
VideoMode="720,400,0"@0,0 1
vrde="off"
usb="off"
ehci="off"
xhci="off"
SharedFolderNameMachineMapping1="shared"
SharedFolderPathMachineMapping1="\\\\?\\C:\\workspace\\courses\\mongodb\\m103\\m103-vagrant-env\\shared"
SharedFolderNameMachineMapping2="dataset"
SharedFolderPathMachineMapping2="\\\\?\\C:\\workspace\\courses\\mongodb\\m103\\m103-vagrant-env\\dataset"
SharedFolderNameMachineMapping3="vagrant"
SharedFolderPathMachineMapping3="\\\\?\\C:\\workspace\\courses\\mongodb\\m103\\m103-vagrant-env"
VRDEActiveConnection="off"
VRDEClients==0
videocap="off"
videocapaudio="off"
capturescreens="0"
capturefilename="C:\\Users\\renda\\VirtualBox VMs\\ubuntu-cloudimg-trusty-vagrant-amd64_1547336789347_34867\\ubuntu-cloudimg-trusty-vagrant-amd64_1547336789347_34867.webm"
captureres="1024x768"
capturevideorate=512
capturevideofps=25
captureopts=""
GuestMemoryBalloon=0
GuestOSType="Ubuntu_64"
GuestAdditionsRunLevel=0
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 0
....

Dear class monitor:

If you wouldn’t mind, please send this feedback to the instructors. Thank you!

I understand the problem that using Vagrant is attempting to solve: to ensure that everyone and every system has a level playing field, with same operating system and the same versions, so that both students and instructors can be sure that the class instructions will work as expected.

However, this has replaced one set of problems (MongoDB setup) with another (Vagrant / Virtualbox setup). If the goal was to keep focus on Mongo, this goal has not worked out in my case, and perhaps in others’ as well. This is disappointing. I was looking forward to the course, and would be able to complete it except for this. Alas, the assignment is coming due, and I have already spent many hours trying to fix this. I must, sadly, unregister for the course and wait until something changes (e.g. new OS, computer or course).

I suggest using the cloud version of MongoDB, or perhaps Docker? Or, maybe there just always will be problems with setup and such, and we as a community should use our interests and competencies (MongoDB) to solve any problems that arise, rather than replacing those problems with a solution about which there is less experience or ability (VirtualBox / Vagrant)?

Anyway, thank you for the course, and for trying out different solutions to teaching!

Sincerely,
Rendall

1 Like

@Rendall_13518 I almost typed up something similar to this. I think Docker would be great for newer systems (I can’t speak for Windows). However on older systems, Docker may still require a virtual box setup due to the system architecture.

I think from a MongoDB learning perspective these issues can appear to get in the way of doing the class, but they do occur even during normal operations and can IMO glean valuable insight into operating a database.

To the “Use MongoDB in the Cloud” I think even in the first class where MongoDB was hosted in Atlas there were still issues, maybe more on the connection oriented side and less on the environment side. But even in that class the student still has to download and install “Compass”.

Any who, any feedback will help MongoU improve the class whatever that may be :slight_smile:

My 2 cents
Mike

@Rendall_13518, I agree with @Mike_67094 and I want to add my comment to the discussion.

Personally, I am very happy that the courses forces me to install and use frameworks and libraries that I would not have tried otherwise because it might be intimidating at first. For example, I am a VirtualBox user but I heard about vagrant but I did not bother, because well another framework. Now with the course I have some kind of understanding. I discovered Anaconda and Flask with M220P. With M101J, not available anymore, I am now acquainted with Maven, Spark and Freemarker.

All this make me more proficient.

@Mike_67094 wrote:

I think from a MongoDB learning perspective these issues can appear to get in the way of doing the class, but they do occur even during normal operations and can IMO glean valuable insight into operating a database.

Thank you for your comment, Mike.

If by “normal operations” you mean a business setting, and “they do occur” you mean issues installing and configuring support software like Vagrant, I agree. Businesses install and configure support software like git and Vagrant and Compass all the time. Businesses that use computers at all often have entire departments of employees whose sole job is to install and configure software! Your observation is both true and a distracting non-sequitur, though. This isn’t a business setting, and there is no support staff.

You also wrote that Vagrant configuration issues and such can “glean valuable insight into operating a database”. Perhaps you have gained insight about MongoDB from Vagrant? I have not, sadly. I would rather have my struggles be with MongoDB, not with Vagrant, but here we are.

@steevej-1495 wrote:

I agree with @Mike_67094

There is nothing to disagree with, there. I agree with him, too!

Personally, I am very happy that the courses forces me to install and use frameworks and libraries that I would not have tried otherwise because it might be intimidating at first.

Every single student who is intimidated by software or a library or a language should install it, play around with it, and relax. I agree with you, too! Both you and Mike have my agreement.

If my feedback were that I found Vagrant intimidating and therefore the instructors should not require it, then your comment would absolutely have addressed my concerns.

Let us not make it this thread about ourselves and our opinions and whether we, personally, like software, but about improving the course. If I installed the software without a hitch, I would not have written this thread, but the issues would still be there. I just would not be aware of them.

This is a MongoDB course, and yet curiously we seem to be spending a lot of energy discussing Vagrant. Specifically, problems with Vagrant. Even curiouser, there appear to be far fewer successfully resolved issues with Vagrant when compared to Mongo questions.

This is a free course, so the instructors will reasonably be interested in solutions that reduce the support costs to as close to nil as reasonable. This is understandable. Vagrant is a part of that. And, as a result, inevitably, some people who could otherwise handle the Mongo course material will be unable to complete the course because of Vagrant. This is a fact that has nothing to do with whether businesses install software or whether sometimes software is intimidating.

It also might be reasonable to cut those people loose (speaking as one of them myself). There may just simply not be the support staff available to resolve the issues that would arise without Vagrant. Seems odd, but I am not in the driver’s seat, so who knows?