Problem configuring mongo db to start up using launch agent

launchd

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

Mongodb starts fine in a terminal.

Best Answer

It seems like the problem was tmux. When executing launchctl without tmux running this bug doesn't occur.