Mongod crashes on launch on MacOS X Monterey

I am running MacOS Monterey (OS X 12.2.1) on an Intel Mac. I had mongod running successfully under a previous OS on the same machine. However, since upgrading, and running brew upgrade to update my installation, any attempt to launch mongod with:

brew services start mongodb/brew/mongodb-community

causes it to crash immediately with the message:

Error: Failure while executing; /bin/launchctl bootstrap gui/501 /Users/username/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist exited with 5.

No output is written to the standard mongo logs, but the crash log generated by the OS includes:

3 mongod 0x108291ada mongo::fassertFailedWithLocation(int, char const*, unsigned int) + 330
4 mongod 0x1058ad4ad mongo::(anonymous namespace)::mdb_handle_error_with_startup_suppression(__wt_event_handler*, __wt_session*, int, char const*) + 445

I have deleted the .lock files in the mongo directory, and the .sock file in /tmp, removed the existing databases, and uninstalled and reinstalled mongo with:

brew install mongodb-community@5.0

Is there something else that I can try to get this working, or should I just give up and run mongo from a Docker container instead?

Hi @Angus_M

Before using the above command, could you please let us know if you had stopped the service and then restarted again:

aasawari.sahasrabuddhe@Aasawaris-MacBook-Pro ~ % brew services stop mongodb-community
Stopping `mongodb-community`... (might take a while)
==> Successfully stopped `mongodb-community` (label: homebrew.mxcl.mongodb-community)
aasawari.sahasrabuddhe@Aasawaris-MacBook-Pro ~ % brew services start mongodb/brew/mongodb-community
==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community)
aasawari.sahasrabuddhe@Aasawaris-MacBook-Pro ~ %

Let us know if this works in your case or any further information is needed.

Thanks
Aasawari

1 Like

This resolved the issue for me.

Many thanks, Aasawari.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.