Carlos Serna
Carlos Serna

Reputation: 601

Why always something is running at port 5000 on my mac

I am a developer and I need to run my ruby app at port 5000, but always I try to run my app I get:

Address already in use - bind(2) (Errno::EADDRINUSE)

I know that the easiest way for solving this; is just change the port that I am using for running my app, but I want to know what happens, because every time I execute lsof -i tcp:5000 and kill the process, automatically a new process starts running in that port.

I am using a macbook pro with MacOs Monterrey with version 12.0.1

Upvotes: 57

Views: 34858

Answers (3)

JAGADESH
JAGADESH

Reputation: 17

change the port number to 5001 and try

Upvotes: -2

Nithin Shastry
Nithin Shastry

Reputation: 161

Goto System Settings > General > AirPlay Receiver > Disable AirPlay Receiver option.

Upvotes: 6

Juanse
Juanse

Reputation: 2474

This happens because Control Center on Monterey listening to port 5000 and port 7000.

For fixing this you need to turn off System Settings > General > AirDrop & Handoff > AirPlay Receiver.

More info

Upvotes: 154

Related Questions