Brew services won't start

Viewed 2101

After installing redis I noticed that the services are not active and I have an error status for:

  • dnsmasq
  • nginx
  • php (which is php8.x)
  • php@7.4
  • redis

I've tried everything I found on the internet, including SO but with no luck.

I tried:

  • reinstalling each service
  • launchctl unload and launchctl load - ~/Library/LaunchAgents/homebrew.mxcl.dnsmasq.plist (I have tried this for each service)
  • brew doctor says: Your system is ready to brew.
  • launchctl enable <service target>

However if I run sudo brew services list everything works except mysql and php (PHP 8.x)

When I try to start each services individually with brew services start SERVICE NAME I get the following error. Here's for php

Bootstrap failed: 5: Input/output error

Error: Failure while executing; `/bin/launchctl bootstrap gui/501
 
/Users/mvpop/Library/LaunchAgents/homebrew.mxcl.php.plist` exited with 5.

I ran out of ideas of what I could try in order to be able to start the services.

Any advice would much appreciate.

Thanks!

UPDATE - I just removed and reinstalled all services one by one and I have the same error when trying to start them:

Bootstrap failed: 5: Input/output error

Error: Failure while executing; `/bin/launchctl bootstrap gui/501
 
/Users/mvpop/Library/LaunchAgents/homebrew.mxcl.php.plist` exited with 5.
1 Answers

Bootstrap failed error: Bootstrap failed: 5: Input/output error

The error seems the service is already started before running the start command so run the restart command instead of the start command.

Like: brew services restart SERVICE NAME

Hopefully, it will help.

Related