woodenfox
woodenfox

Reputation: 334

Heroku Open "Puma Port 5000 Already In Use" Rails

When I Control-C to quit "Heroku Open" (the Heroku Toolbar server command). I'm unable to restart. I receive this error:

/vendor/bundle/gems/puma-2.14.0/lib/puma/binder.rb:233:in `initialize': Address already in use - bind(2) for "0.0.0.0" port 5000 (Errno::EADDRINUSE)
web.1  | s/vendor/bundle/gems/puma-2.14.0/lib/puma/cluster.rb:304:in `run'

Is their a "correct" way to shut down the Heroku Toolbar local rails server in order to avoid this problem?

Upvotes: 2

Views: 1939

Answers (1)

woodenfox
woodenfox

Reputation: 334

The only method I've used that works to resolve this problem is to run lsof to identify what is using port :5000 and then sudo kill on the pid(s) that are accessing that port.

lsof -i :5000 
sudo kill -9 <pid>

Upvotes: 7

Related Questions