Search code examples
macosmongodblaunchd

Configuring launch agent on mac os to start mongo db fails with an obscure socket error


After installing mongodb using homebrew, and following the information that homebrew provided, I did the following:

launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist 

But got the following error:

Bug: launchctl.c:2406 (25182):13: (dbfd = open(g_job_overrides_db_path, O_RDONLY | O_EXLOCK | O_CREAT, S_IRUSR | S_IWUSR)) != -1 
launch_msg(): Socket is not connected

Starting a mongodb process in the terminal works fine.

Any ideas?


Solution

  • By any chance were you using tmux? I came across this discussion of a similar bug under iTerm2 issues which proposes that tmux might interfere with the sockets. I also read somewhere else confirming the same behavior.

    http://code.google.com/p/iterm2/issues/detail?id=997