pry-debugger icon indicating copy to clipboard operation
pry-debugger copied to clipboard

Pry-remote show address already in use when quit from rails app

Open kdstarter opened this issue 10 years ago • 11 comments

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?

kdstarter avatar Nov 13 '14 07:11 kdstarter

What is causing this issue?

sungwoncho avatar Mar 08 '15 23:03 sungwoncho

I have the same problem.

tarky avatar Mar 12 '15 05:03 tarky

I have the same problem. too

zackexplosion avatar Apr 07 '15 02:04 zackexplosion

:+1:

antarr avatar Apr 07 '15 16:04 antarr

me too. =/

viniciustorves avatar May 26 '15 20:05 viniciustorves

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.

wuzzzzaah avatar Jun 03 '15 11:06 wuzzzzaah

Just had this happen to me too

BrennerSpear avatar Aug 19 '15 21:08 BrennerSpear

In terminal, put: lsof -i tcp:9876 Check the PID column. that's the PID you want to kill. put: kill -9 <PID>

BrennerSpear avatar Aug 19 '15 22:08 BrennerSpear

@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 avatar Feb 03 '16 23:02 snoblenet

@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 avatar Feb 04 '16 01:02 BrennerSpear

@BrennerSpear worked it out:

kill -9 $(lsof -ti tcp:9876)

snoblenet avatar Feb 04 '16 01:02 snoblenet