Cannot get MongoDB 3.0.6 to run on Ubuntu 14.04

132 views
Skip to first unread message

Aaron Martone

unread,
Sep 13, 2015, 8:22:49 AM9/13/15
to mongodb-user
Hey all, I'm new to MongoDB and Ubuntu (learning both as fast as I can) and I've been at this particular issue for 2 days, so I figure it's time to ask for some help. To give you a picture of the situation, here's my setup:

Using Virtualbox 5.x, my host OS is Windows 7 Pro x64. My guest OS is Ubuntu 14.04. I have a share on my host OS that VirtualBox makes available to Ubuntu, located at C:\Server on my host OS (shared as 'Server', of which there is a subfolder of data, and within that, a folder db (for mongo's data) and log (for mongo's log files)) and located at '/media/sf_Server' on my guest OS (and Symlinked as /home/aaron/Server => /media/sf_Server)

I modified the mongod.conf to point to:

dbpath=/media/sf_Server/data/db
logpath = /media/sf_Server/data/log/mongod.log
port = 27017
bind_ip = 0.0.0.0

(I have tried both 0.0.0.0 and 127.0.0.1 for the bind_ip value).

When I run: sudo service mongod start, the service starts and then stops (assuming so, as running 'top -p <processnumber>' reveals nothing.

Initially I thought the issue might be that the mongodb user did not have rights on the share, so I noticed that the share group 'vboxsf', and made mongodb a member of that group. But still, when I type 'mongo' to open a shell, I get the following error:

Failed to connect to 127.0.0.1:27017, reason : errno:111 Connection refused

I'm assuming that's because the service isn't running, so if I can get mongod to stay up and running, that might resolve the issue. I believe in the log file, it stated that the request to /media/sf_Server/data resulted in a Permission Denied. However, I do see that it created a journal folder and a mongod.lock file there.

Any help is greatly appreciated!

Serhat Şevki Dinçer

unread,
Sep 13, 2015, 11:11:52 AM9/13/15
to mongodb-user
On ubuntu try

mongod --dbpath /some/dir --logpath /other/mng.log

and make sure that your mongodb works by connecting to it with just:

mongo

Verify the version. Then you can start playing with more complex setups & options.

Mohamed Ayoub Benjelloun

unread,
Sep 15, 2015, 11:38:57 AM9/15/15
to mongodb-user
Have you tried this ? :

sudo chmod 0755 /media/sf_Server/data/db
sudo chown mongod:mongod /media/sf_Server/data/db

then :

sudo service mongod start

Wan Bachtiar

unread,
Sep 16, 2015, 2:08:47 AM9/16/15
to mongodb-user

Hi Aaron,

VirtualBox shared folders do not support fsync on directories, so your dbpath needs to live on a non-shared directory within the VM.

To confirm if your dbpath is on a supported filesystem format, you could try running ‘mongod’ directly on a shell first.

mongod --dpath /media/sf_Server/data/db

A VirtualBox shared folder will currently produce an error message (and a backtrace) containing :

[initandlisten]     WARNING: This file system is not supported. For further information see:
[initandlisten]             http://dochub.mongodb.org/core/unsupported-filesystems
[initandlisten]         Please notify MongoDB, Inc. if an unlisted filesystem generated this warning.

OR if you are using WiredTiger storage engine:

[initandlisten] WiredTiger (22) ... fsync: Invalid argument 
[initandlisten] Fatal Assertion 28561


Regards,

Wan




Reply all
Reply to author
Forward
0 new messages