Qingjian Wang
Qingjian Wang

Reputation: 165

Brew services start and stop issue

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.

when started the picture also suggest with yellow warning

Upvotes: 7

Views: 19033

Answers (2)

shahid
shahid

Reputation: 1

I had a brew service start issue with my rabbitmq in the following.

Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/USERNAME/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist` exited with 5. 

fixed:

launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.rabbitmq.plist

Upvotes: 0

Charlie
Charlie

Reputation: 2231

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)

Upvotes: 4

Related Questions