08 May 2021

If you install RabbitMQ on macOS using Homebrew, you'll ocassionally get a well-intentioned prompt from the system firewall asking if you'd like to accept incoming connections. You will click Accept and go on your merry way, thinking that - like other times you've done this - that that will be the last time you'll have to do that for RabbitMQ. But it won't be. You'll be prompted again, and again, and again. RabbitMQ occasionally changes the socket it uses so you'll get seemingly endless prompts. The documentation spells out the fix. Based on that, here's what I did to make it work on my machine.

#!/usr/bin/env bash 
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add $E/erl
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp $E/erl

sudo /usr/libexec/ApplicationFirewall/socketfilterfw --add $E/beam.smp
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --unblockapp $E/beam.smp