Bind error
Posted: 23 February 2010 11:21 AM   [ Ignore ]
Sr. Member
RankRankRankRank
Total Posts:  132
Joined  2009-10-02

I recently set up another development machine and sometimes i get the following error.

=> Booting WEBrick
=> Rails 2.3.2 application starting on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
[2010
-02-23 12:11:19] INFO  WEBrick 1.3.1
[2010
-02-23 12:11:19] INFO  ruby 1.8.7 (2009-06-12[i486-linux]
[2010
-02-23 12:11:19] WARN  TCPServer ErrorAddress already in use - bind(2)
[2010-02-23 12:11:19] WARN  TCPServer ErrorAddress already in use - bind(2)
Exiting 

How do i find the PID of the old process to kill it.

Profile
 
 
Posted: 23 February 2010 12:04 PM   [ Ignore ]   [ # 1 ]
Administrator
RankRankRankRank
Total Posts:  249
Joined  2008-12-18

If the old process is WEBrick then just do:

ps wwaux | grep ruby

or if it’s another process that you’re not sure of do:

sudo netstat -nlp

This will give you a list of processes and ports.

Profile
 
 
Posted: 23 February 2010 03:52 PM   [ Ignore ]   [ # 2 ]
Sr. Member
RankRankRankRank
Total Posts:  132
Joined  2009-10-02

My /etc/hosts entry for the local app is

127.0.0.1               app.ubliplocal.com 

Should it be 0.0.0.0 ?

Profile