To DHz: Got stuck with M201 MongoDB Performance MLaunch in Windows

193 views
Skip to first unread message

Carlos F. Enguix

unread,
May 31, 2017, 9:03:25 PM5/31/17
to mongodb-user
Hi DHz:

I am a Windows 10 Home Edition 64 bit user and I am using the MongoDB Enterprise version in a non production environment.
In the Understanding Explain part 2 Kirby uses the mtools mlaunch utility to set up a MongoDB environment.

I  tried to use cygwin and git bash but none of them support the mongod --fork option, so both of them halt their execution.

Please note that I am no Linux expert and my knowledge of python is limited. I read the code of mlaunch and it includes the fork option. 

I got rid of the fork option and included in front of the command "start /b" to run in the background the process.

C:\>mlaunch init --single --sharded 2
The filename, directory name, or volume label syntax is incorrect.

can't start process, return code 1. tried to launch: start /b mongod  --dbpath C:\data\shard01\db --logpath C:\data\shard01\mongod.log --port 27018 --logappend  --shardsvr

Later I found out that "mlaunch" is not supported on Windows.

What are the alternatives? Can you provide a Vagrant configuration file for setting up MongoDB Enterprise version in Centos or other Linux distro?

 Please reply soon as there is a deadline for the course.

Regards

Carlos

Nathan Leniz

unread,
Jun 1, 2017, 4:08:20 PM6/1/17
to mongodb-user
Hi Carlos,

Sorry to hear you're having issues with mlaunch, but I think we can get that sorted out. I've gone ahead and made a downloadable package with a Vagrantfile and provisioning script that should allow you to complete the course.


After you download it and unpack the contents to your desired directory, simply run vagrant up, let it provision, then vagrant ssh

You'll notice that it will create two folders, shared and dataset. These link to the /shared and /dataset folders in the vm. You can download handouts and copy them to one of these two locations in order to make them accessible.

Please reply back if something is still amiss, otherwise best of luck in the course and hope you have great success in learning MongoDB.

v/r,

Nathan Leniz, Curriculum Engineer

Carlos F. Enguix

unread,
Jun 2, 2017, 1:17:06 PM6/2/17
to mongod...@googlegroups.com
Hi Nathan:

Thanks for the soon reply to my problem. Now I tried to install Compass in the VM by following the Ubuntu release but it did not work because it says that it has some dependencies. What I am not sure if Compass can be installed in a Vagrant VM:

vagrant@enterprise:~$ sudo dpkg -i mongodb-compass_1.6.0_amd64.deb;
(Reading database ... 86409 files and directories currently installed.)
Preparing to unpack mongodb-compass_1.6.0_amd64.deb ...
Unpacking mongodb-compass (1.6.0-1) over (1.6.0-1) ...
dpkg: dependency problems prevent configuration of mongodb-compass:
 mongodb-compass depends on git; however:
  Package git is not installed.
 mongodb-compass depends on gconf2; however:
  Package gconf2 is not installed.
 mongodb-compass depends on gconf-service; however:
  Package gconf-service is not installed.
 mongodb-compass depends on gvfs-bin; however:
  Package gvfs-bin is not installed.
 mongodb-compass depends on libgtk2.0-0; however:
  Package libgtk2.0-0 is not installed.
 mongodb-compass depends on libnss3; however:
  Package libnss3 is not installed.

dpkg: error processing package mongodb-compass (--install):
 dependency problems - leaving unconfigured
Processing triggers for mime-support (3.54ubuntu1.1) ...
Errors were encountered while processing:
 mongodb-compass

Please note that my Linux knowledge is limited. Thanks

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to a topic in the Google Groups "mongodb-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mongodb-user/QWoWvmXDwf0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/5c051459-5ca0-4576-9d8a-ec6259f2f6ae%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Carlos Fernando Enguix Cervera

Nathan Leniz

unread,
Jun 2, 2017, 4:33:48 PM6/2/17
to mongodb-user
Carlos,

A lot of those requirements revolve around installing missing dependencies, and some of them are big like installing a GUI. If you'd like to go that route you're free to do so, but I'd highly recommend against it as it will substantially increase the size of the VM on disk.

I'd recommend you install Compass under your native Windows 10 environment with the installer found at https://www.mongodb.com/download-center?filter=enterprise#compass

After installing Compass, we'll need to make some configuration changes to the VM to accept incoming connections on different ports. Here's a link to a gist of the new Vagrantfile settings https://gist.github.com/terakilobyte/faade664706f73f72588d69b5a22527c

Replace the contents of your Vagrantfile with the contents of the gist. After doing that and saving, run the command

vagrant reload

This should allow you to connect to the running instances of mongod in your vm from your host computer. You'd then connect with Compass as if the mongod processes were running locally.

Again, feel free to follow up with any additional questions. Hope this helps!

Nathan

Carlos F. Enguix

unread,
Jun 3, 2017, 5:52:46 PM6/3/17
to mongod...@googlegroups.com
Many thanks Nathan. It works. 

Just one remark: one should verify in Windows the ports that are being used to set the available ports with netstat -a -b to configure properly the Vagrant configuration file. At least it worked for me!

Later run Compass in Windows and voila you have access to MongoDB dbs and collections on the Vagrant VM

Cheers

Carlos


For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages