Sometime ago, I cloned an application on github and ran it locally to look at it. It was a ruby application running on rack. The port I used to view it was localhost:9292.
Fast forward to today. I am trying to run a very simple rack application I wrote. Just a one liner basically to study rack. When I go to localhost:9292, the old application I downloaded before comes up in my browser. I have no idea why this is happening and since I don’t need the app, I closed everything and deleted that old application from my computer. I then tried ‘localhost:9292’ again, and oddly, that same application came up.
Even when I don’t run anything, rack or otherwise, any time I go to localhost:9292, I get that ghost application showing up. I’ve tried clearing the cache and killing rack, restarting firefox, etc. This happens only on Firefox. Only when I use another browser do I get the proper response on localhost:9292. So I guess this has to do with Firefox somehow tying that port to that other application.
My question is how do I clear this application from Firefox? And what is the mechanism by which Firefox would tie a port to one application (for months literally) after I ran it. I don’t believe this is happening from rack as I suppose I could just keep using another browser but I’d really just like to know what is happening to cause this. I’ve been searching around for this for hours and can find nothing.
I guess rack likes to stick around even after its controlling terminal is gone.
You will get output something like this:
The line at the top is your old server. kill it by passing its PID (the number on the left on that line) to
kill:kill 9159
or
kill -9 9159
That should do the trick.
Failing that, you can just restart your machine and the program will be gone when it has restarted.