Question

I am confused.

brew services list is showing me that mongod is being loaded at login

mongodb    started        - /Users/myuser/Library/LaunchAgents/homebrew.mxcl.mongodb.plist

but, when I do mongo I get Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused

How do I make mongod to start as a service? The content of the .plist file can be viewed here: http://pastebin.com/itxUtZ8M

Any suggestions much appreciated. P.S. I am running on OS X Maverick (OS X 10.9.2)

Was it helpful?

Solution

Starting mongod manually with the command /usr/local/opt/mongodb/bin/mongod --config /usr/local/etc/mongod.conf showed that something was wrong with the log file:

FileNotOpen Failed to open "/usr/local/var/log/mongodb/mongo.log"

As it turned out, the owner of the file was wrong. Changing it to myuser solved the problem. See comments below the question for details.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top