Brew services start and stop issue
Asked Answered
B

2

7

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

Bakemeier answered 1/3, 2019 at 8:30 Comment(1)
Did you ever fix this?Liripipe
B
3

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)
Beast answered 6/4, 2022 at 19:31 Comment(1)
Yes launchctl unload blah.plist seems to have fixed my problems with brew services stop tor and brew services restart postgresql@14Hillel
L
0

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
Laevorotatory answered 25/8, 2023 at 21:7 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.