Fixing "Domain does not support specified action" when starting Redis on macOS 12.1 (Homebrew)

That launchctl ... exited with 125 error is usually a permissions / ownership problem when using multi-user Homebrew on macOS. Fix it by ensuring a shared brew group exists, your user is in it, and Homebrew directories are group-owned and group-writable.

TL;DR

  • That launchctl ... exited with 125 error is usually a permissions / ownership problem when using multi-user Homebrew on macOS.
  • Fix it by ensuring a shared brew group exists, your user is in it, and Homebrew directories are group-owned and group-writable.
  • Afterward, brew services start redis works again and redis-cli ping returns PONG.

Redis is usually boring—in the best way. But one day I booted a Rails app (rails s) and noticed Redis wasn’t running. I manage local dependencies with Homebrew, so my first instinct was: “This should be one command.”

It wasn’t.

Symptom

Redis showed as stopped:

brew services list

…and when I tried to start it:

brew services start redis

I hit:

Could not enable service: 125: Domain does not support specified action
Error: Failure while executing; /bin/launchctl enable gui/501/homebrew.mxcl.redis exited with 125.

Context

At the time, I was on macOS 12.1 with a multi-user Homebrew setup (two admin users on the same machine).

What I tried first (and why it didn’t help)

I went for the usual cleanup loop:

  1. Reinstall Redis:
brew reinstall redis

Same error.

  1. Uninstall + cleanup:
brew uninstall redis
brew cleanup
brew services cleanup

brew services cleanup reported nothing to clean.

  1. Remove a leftover LaunchAgent plist

Homebrew services uses LaunchAgents, so I checked:

ls ~/Library/LaunchAgents

I found a leftover homebrew.mxcl.redis.plist, deleted it, reinstalled Redis, and tried again.

Same error.

The “wait, why does it work under the other user?” moment

Because multiple users were involved, I tried starting Redis under the other account:

brew services start redis

That printed a success message… but Redis still wasn’t truly running.

brew services info redis

showed “Loaded” but not “Running”.

The fix: repair Homebrew multi-user permissions

What finally worked was fixing multi-user Homebrew permissions by ensuring:

  • A brew group exists
  • Your user(s) are members of that group (log out/in to apply)
  • Homebrew directories are group-owned by brew and group-writable

Run:

sudo chgrp -R brew "$(brew --prefix)"/*
sudo chmod -R g+w+x "$(brew --prefix)"/*

After that, brew services start redis behaved normally again.

Quick verification

brew services list
brew services info redis
redis-cli ping

If everything is healthy you should see Redis running and PONG from redis-cli ping.

Backlinks

No backlinks yet.

Similar