Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is homebrew services start log

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?

like image 988
BaiJiFeiLong Avatar asked Nov 30 '18 01:11

BaiJiFeiLong


2 Answers

The usual logs end up in /usr/local/var/log/.

like image 126
Bruno E. Avatar answered Nov 06 '22 21:11

Bruno E.


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>
like image 21
Kublai Gomez Avatar answered Nov 06 '22 22:11

Kublai Gomez