pry-debugger
pry-debugger copied to clipboard
Pry-remote show address already in use when quit from rails app
I am trying to debug a Rails app running inside foreman, when I type quit from pry-remote, there is an error Errno::EADDRINUSE (Address already in use - bind(2) for "127.0.0.1" port 9876)
. It's similar with issue https://github.com/Mon-Ouie/pry-remote/issues/42, is there any problem?
What is causing this issue?
I have the same problem.
I have the same problem. too
:+1:
me too. =/
I encounter this everyday. Killing the process usually works. Just do a netstat and find port 9876, then kill the process listening on that port.
Just had this happen to me too
In terminal, put:
lsof -i tcp:9876
Check the PID
column. that's the PID you want to kill.
put:
kill -9 <PID>
@BrennerSpear Thanks. Is it possible to write this as a one-liner that pipes the PID to the kill command? I know enough bash to know what I don't know.
@snoblenet I don't know enough bash to even know what any of those commands really mean - I just googled enough to figure it out.
@BrennerSpear worked it out:
kill -9 $(lsof -ti tcp:9876)