I've got two services one is elasticsearch, the other is mongodb, recently I found the mongodb service have some issues while i start or stop it.
The case is while I start mongo with the following command when the mongodb service is actually stopped.
brew services start mongodb
,
it shows me following errorCode but it was started
----------Error Code-------------
/Users/attis/Library/LaunchAgents/homebrew.mxcl.mongodb.plist: service already loaded
Error: Failure while executing; /bin/launchctl bootstrap gui/501 /Users/attis/Library/LaunchAgents/homebrew.mxcl.mongodb.plist
exited with 133.
while I stop mongo with the following command when the mongodb service is actually started. it shows me the following errorCode but it was stopped after it.
---------Error Code---------------
Error: Service mongodb
is not started.
I'm not familliar with the launchctl mechanism. Could any one suggest to help me fix the annoying issue. especially while i start all services it will block all the following services that start after mongodb from getting started.
I just had the same issue with RabbitMQ and the fix was intuitive - simply unload the plist manually. Not sure if it will fix Mongodb but worth a shot. In my case I did:
$ brew services start rabbitmq
/Users/XXXX/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist: service already loaded
Error: Failure while executing; `/bin/launchctl bootstrap gui/502 /Users/XXXX/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist` exited with 37.
$ launchctl unload /Users/XXXX/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist
$ brew services start rabbitmq
==> Successfully started `rabbitmq` (label: homebrew.mxcl.rabbitmq)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With