When I run brew services start mosquitto
, The service does not really start. When I use brew services list
, the services has a yellow started
status. I want to know why this service start failed, how?
The usual logs end up in /usr/local/var/log/
.
When you see "started" in yellow for a brew service means that the status of the service is "unknown", the started text is printed for retro compatibility.
In your case I suggest to add some log output to your .plist associated file, to edit the correct plist file check the output of "brew services list" command on the mosquitto line you will have the name of the correspondent .plist file, edit that file and add two entries, I print the plist file that I use for my apache installation, please use this file as a guide. check the lines for StandardOutPath and StandardErrorPath and create something similar for your specific case.
After saving the file try to run again the service but this time check the logs associated. In my experience when you see a yellow started, this means that you have some permissions problem, you can try to save the data associated and reinstall the brew formulae as a second option.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>homebrew.mxcl.httpd</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/opt/httpd/bin/httpd</string>
<string>-D</string>
<string>FOREGROUND</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/usr/local/var/log/hombebrew/httpd/homebrew.mxcl.httpd.log</string>
<key>StandardErrorPath</key>
<string>/usr/local/var/log/hombebrew/httpd/homebrew.mxcl.httpd.stderr.log</string>
</dict>
</plist>
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