user14749773
user14749773

Reputation: 143

Is there a way to solve: `initialize': Address already in use - bind(2) for "127.0.0.1" port 3000 (Errno::EADDRINUSE)?

CHECK THE ERROR AND THE COMMANDS I RUN AT THE END OF IT

=> Booting Puma => Rails 6.0.3.4 application starting in development => Run rails server --help for more startup options Puma starting in single mode...

I get the above error. I tried to do:

  1. lsof -wni tcp:3000 I GET: NO RESULTS
  2. ps aux | grep puma
    I GET: mvmarco 7805 0.0 0.0 6304 724 pts/0 S+ 20:52 0:00 grep --color puma
  3. kill -9 7805 I GET: kill: kill 7805 failed: no such process
  4. kill PID I GET: kill: illegal pid: PID
  5. sudo fuser -k -n tcp port I GET: Cannot resolve local port port: Servname not supported for ai_socktype

EVERYTHING WAS WORKING BEFORE I DID A SETUP FOR MY INTERNSHIP, THEY USE DOCKER. I AM WONDERING HOW TO LET IT WORK AGAIN

Upvotes: 0

Views: 2069

Answers (1)

harisp9631
harisp9631

Reputation: 51

It seems like there is another instance of Puma still running. To kill it, I usually use:

pkill -9 -f puma 

Hope it works for you as well.

Upvotes: 5

Related Questions