1

I'm having trouble getting mongodb to run in OSX Mavericks. I installed it using brew, but when I run mongod it tell me that output is going to usr/var... as normal then quits out to the terminal prompt with no errors. Any ideas what the problem could be?

I've tried removing the .conf file and reinstalling, I've checked nothing else is using the port. When I try and run it through the launchctl plist file it says the file doesn't exist.

Thanks,

Tom.

5
  • 1
    Have you tried to run mongod service using all command line parameters? Create a folder somewhere in your drive and start it using "mongod --dbpath yourfolder --logpath myfile.log --logappend" and check the result. I have several instances of mongo running in my Mac with Maverick OSX and it works perfectly, sharding, everything. Commented Feb 3, 2014 at 19:55
  • Worked like a charm, thanks! I guess that means the default dbpath needs looking at? Commented Feb 3, 2014 at 20:18
  • The problem is sometimes how mongo takes the environment. I saw when you use the automatic installer it creates a bunch of configuration and they work perfectly in Linux, but for some reason it fails when you restart it. I think it's a small issue in the installer but I'm not totally sure. Commented Feb 3, 2014 at 20:31
  • Yeah it's weird, it works when I type mongod --dbpath /data/db/ Which is the default dbpath anyway??? Commented Feb 3, 2014 at 20:36
  • 1
    It's the default path, right, but you should check the config file it's normally created in /usr/local/etc/mongod.conf and it's the one mongod uses when installation is made with brew. Check where it's stored, sometimes it's also in /usr/local/mongodb_data. When you find it start your instance with mongod --conf and the file to see if that was the issue. Commented Feb 3, 2014 at 20:46

1 Answer 1

5

Create a folder somewhere in your drive and start it using

mongod --dbpath yourfolder --logpath myfile.log --logappend 

.. and check the result.

I have several instances of mongo running in my Mac with Maverick OSX and it works perfectly. I think it's the best way to test it. After that you can review what's going on with the config files. If this works you can add --fork at the end to fork the process.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.