MongoDB error when tryin to start up services - mongodb

I recently have been having issues with mongoDB services.
I am running on MacOs Ventura v13.0.1.
I even removed MongoDB from machine and try to re-isntall it.
Install process.
brew tap mongodb/brew
brew install mongodb-community#6.0
Running services
brew services start mongodb-communit#6.0
Checking services
brew services
error
mongodb-community error 3584 root ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist
Any help would be great. I have been stuck on this and cannot run a a MongoDB server on my machine.

It sounds like there is an issue with the launch agent plist file for MongoDB. This file is used by macOS to start MongoDB as a service when your machine boots up.
You can tryp following steps to resolve the issue:
Stop MongoDB service by running the command brew services stop mongodb-community#6.0.
Remove the launch agent plist file by running the command rm ~/Library/LaunchAgents/homebrew.mxcl.mongodb-community.plist.
Restart MongoDB service by running the command brew services restart mongodb-community#6.0.
Verify that MongoDB service is running by running the command brew services again.
If the issue still persists after following the steps above, you can try uninstalling and reinstalling MongoDB using Homebrew's cleanup command brew cleanup mongodb-community#6.0 before reinstalling.
Also you can check MongoDB's log files located in /usr/local/var/log/mongodb/ to see if there is any error message that can help you troubleshoot the issue.

Related

MongoDB Installation error. what is solution for this error?

what is solution for this error.
I want to install MongoDB in Mac with home-brew but this error in terminal
❯ brew tap mongodb/brew
❯ brew install mongodb-community
Error: No such file or directory - /opt/homebrew/var/homebrew/linked/mongodb-community
I want to install MongoDB...
Download the MongoDB Community Server version suitable for your Mac from the official website: https://www.mongodb.com/download-center/community.
Install MongoDB by double-clicking the downloaded .pkg file.
Note: To run MongoDB as a service on macOS, refer to the official MongoDB documentation on setting up launchd: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-os-x/#configure-launchd-to-start-mongodb-automatically.

MongoNetworkError: connect ECONNREFUSED 127.0.0.1:27017 | Intel macOS monterey

I use macOS monterey (intel). I tried installing mongodb manually. Same problem. I used homebrew to install mongodb-community#6.0. Same problem.
Nomatter what I try. I get this error. Please help!!!
For me, it worked just by stopping and starting the MongoDB community service
First Stop the service
brew services stop mongodb-community
then Start it again
brew services start mongodb-community
I have had exactly the same problem, though on an M1 Mac. After a lot of googling mongo.log messages and changing ownership and group of various files, I managed to get mongo up and running again by reverting to version 5.
The sequence which should get you up and running is:
brew services stop mongodb-community
brew install mongodb/brew/mongodb-community#5.0
brew services start mongodb/brew/mongodb-community#5.0
A quick check using mongosh indicated all was up and running with no loss of data. I made a copy of my data before I made any changes, just in case:
cd /opt/homebrew/var
cp -a mongodb mongodbsave

Trouble running MongoDB server on macOS Monterey 12.0.1

I've installed MongoDB through Homebrew and when I start the server using brew services start mongodb-community (or mongodb-community#5.0) command it immediately fails and turn the brew services list to error!
I already tried giving permission - using Rosetta to install and run - etc. but ended up with the same error.
The only thing I don't know how do (which might potentially work) is to change the directory of MongoDB, but I am not sure that could be a solution or not!
Unloading and loading launchctl solved the permission issue.
Try running below command after installation of mongodb:
sudo brew services restart mongodb/brew/mongodb-community
Then running sudo brew services list will show the mongodb-commuity service status to started.

Can't start Mongodb shell on MacOS Mojave 10.14.2

Installed MongoDB Community Edition version 3.6 (because my work project requires that version). I am for some reason unable to run the MongoDB shell, so when trying to run mongo or mongod from the terminal I just get -bash: mongod: command not found. When checking which Brew services are running with brew services list, mongodb-community#3.6 is listed. The application I'm working on also utilises MongoDB succesfully. My main issue is that I can't access the MongoDB shell.
The solution to my problem was that I was supposed to install the shell separately with brew. This was not the case with previous MongoDB versions and it is not mentioned in the official MongoDB documentation.

Mongodb will automatically shut down even though permissions are correctly set

Read/Write permissions set
Mongodb still won't work
I used brew to install mongodb and updated it and everything.
I used this tutorial to download and install. I was able to do everything listed but when I tried mongod it didn't work. I've had mongodb downloaded and working previously on my laptop but had to factory reset recently and now it won't work.
I think mongod instance could not create the lock file or a lock file is already present in the location. Which means the current instance cannot get hold of it.
Remove the current lock file and restart your service.
sudo rm /data/db/mongod.lock
Restart
brew services stop mongodb
brew services start mongodb
Have you checked the version? I think when you can successfully check the version, it means your mongodb is ok and have been installed properly.
Here's how to check mongodb version "mongod --version".