问题
When I tried brew services list command, dnsmasq, nginx status started but yellow. php71 and mysql is started and green.
Previously when my Mysql status started but yellow Mysql doesnt work.
Now my nginx and dnsmasq status started and yellow but everthing works fine.
What is the meaning started but yellow written status? Everything ok or?
回答1:
Unfortunately the yellow color means status unknown. Wonder why it says started though.
I just found out because the status for apache 2.2 on OS X 10.11.6 is yellow as well. Don't know if it's actually working properly.
See the homebrew services list github code
https://github.com/Homebrew/homebrew-services/blob/0ce2f592dc22bce1b4aa2268c6dc416fe131abb2/cmd/brew-services.rb#L165-L177
EDIT: Updated the code reference. Thanks @SidOfc (didn't know GitHub links can highlight sections)
回答2:
The following steps worked to solve this for me:
Remove the
postmaster.pidfile for your service (i.e.rm /usr/local/var/postgres/postmaster.pid).Restart your service on homebrew (i.e.
brew services restart postgresql).
回答3:
I had this just now for mariadb, and solved it by running brew reinstall mariadb.
I had just installed a new version of MAMP and I suspect something of MAMP had overwritten something related to mariadb.
回答4:
I think its yellow for the apps that are started by the root user. If you type sudo brew services list you get every app that's started by root as green, and the ones that are started by other users as yellow.
回答5:
If your configuration can make the service run as either daemon or non-daemon, do not make it daemon.
I found the yellow status when I configured daemon in haproxy.cfg. After I removed daemon in the configuration and restarted it (including killing the process, as brew does not really know which process to stop in the daemon mode of haproxy), HAProxy showed the bright green ‘started’ status. And I can now really stop it with brew services stop. :-)
来源:https://stackoverflow.com/questions/41873704/what-is-the-meaning-yellow-service-started-status-on-homebrew