already performing on port 4567

1,443 views
Skip to first unread message

MilesTogoe

unread,
Jun 15, 2009, 6:42:53 AM6/15/09
to sina...@googlegroups.com
running in development mode with webrick I sometimes get stuck with this
error msg:
already performing on port 4567 which prevents restarting the server

It seems like it occurs when I accidentally switch users without killing
(cntrl c) the server or maybe it's just a leak when starting, stopping
the server numerous times.

sans restarting my linux instance, is there someway to clear or kill the
running instance with webrick ?

Sam Roberts

unread,
Jun 15, 2009, 2:21:22 PM6/15/09
to sina...@googlegroups.com

Use ps to find the process id, and kill to kill it?

MilesTogoe

unread,
Jun 15, 2009, 3:19:00 PM6/15/09
to Kematzy, sina...@googlegroups.com
Kematzy wrote:
>
> Miles,
>
> I've added this little function to my .bash_profile.
>
> function whats-on-port {
> lsof -i TCP:$1
> }
>
> You can then go : whats-on-port 4567 and get the process id of
> what's running on that port.
>
> Once you have that process id you can kill that process.
>
> I'm sure the *NIX gurus on this list can do it better, but it works.
>
> Kematzy

thks, I also found that simply "ps aux | grep ruby" gives the pid's and
a simple kill <pid> seems to clear out the processes.

Graham Ashton

unread,
Jun 22, 2009, 8:50:52 AM6/22/09
to sina...@googlegroups.com
On Monday, June 15, 2009, MilesTogoe wrote:

> already performing on port 4567

You can try "lsof -i :4567" to find which process has the port open,
then stop it with kill.

Reply all
Reply to author
Forward
0 new messages