'Mongodb-community error homebrew.mxcl.mongodb-community.plist
I've been having this error while running brew services start mongodb-community
mongodb-community error root /Library/LaunchDaemons/homebrew.mxcl.mongodb-community.plist
I have tried re installing home brew, mongodb and a slew of other solutions but nothing has worked. Any help would be appreciated, thanks!
Solution 1:[1]
Hello so running sudo brew services start mongodb-community fixed it after stopping mongodb.
Solution 2:[2]
I had the same issue. Finally found the error in /usr/local/var/log/mongodb/mongo.log which indicated that my database files in /usr/local/var/mongodb were too old (version 4.2) for this version of mongodb (version 4.4). Since I didn't need those files, I deleted them, and mongodb started up fine. Read your logs, they will tell you what's wrong.
Solution 3:[3]
Hello just debugged a similiar problem. If you attempt to run mongodb with root it shows error and the problem is likely a file permission problem.
You can confirm where (directory may vary this is the default): show mongo log with
cat /usr/local/var/log/mongodb/mongo.log
You are most likely seeing a "Permission denied" error on a file. (mine was for a bunch of files).
You will need to run chown on those files:
chown -R <login> /usr/local/var/mongodb
should solve it.
You can verify by running
ls -la <directory> and verifying everything is now owned by your login user.
Solution 4:[4]
I tried for 2 hours solving this problem. The problem was with an unexpected token in mongod.conf file, that made the [email protected] to not to start .
To track the issue open the .plist file look at the output log file location, you can find it after StandardErrorPath key.
Solution 5:[5]
Please refer https://blog.codewithdan.com/installing-mongodb-on-mac-catalina-using-homebrew/ I followed this to create a data/db folder under /System/Volumes/Data and updated the path in /usr/local/etc/mongod.conf for the variable 'dbPath:'
Make sure the user and user permissions (The user who creates this file is the same user who runs the brew service for Mongo)
Still my services haven't started. I got the error when I run 'brew services list'
Same error mentioned above on this issue.
When I checked /usr/local/var/log/mongodb/mongo.log
It Failed to unlink /tmp/mongodb-27017.sock this file.
Please refer the following link to solve this.(Just delete that .sock file)
https://www.dev2qa.com/how-to-fix-failed-to-unlink-socket-file-error-when-start-mongo-db-on-macos/
Then, I made sure the permissions for data/db are good
d-wx--x--x 3 name wheel 96 Mar 22 11:20 data
Then stopped the brew services for mongo and started again. It worked.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nkhalid |
| Solution 2 | Jonathon Hill |
| Solution 3 | Craig Eddy |
| Solution 4 | Pranu Pranav |
| Solution 5 | SaiVani |
