If you’ve had this issue before then you know it can be a pain to change your port or even restart your Mac each time it happens.
Thankfully there’s an easier way...
Find and kill the process responsible
- Open the terminal on your Mac
- Find what processes are running on the affected port:
lsof -i: <port number>
- Kill the process that’s responsible:
kill -9 <process number>
Here's a link to the Stack Overflow post and thanks to user BitcoinKing for the solution: