Heroku Open “Puma Port 5000 Already In Use” Rails

半城伤御伤魂 提交于 2019-12-10 23:33:36

问题


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?


回答1:


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>


来源:https://stackoverflow.com/questions/33048784/heroku-open-puma-port-5000-already-in-use-rails

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!