2011-02-18 123 views
1

如果我開始雜種的錯誤會來。我能做什麼? 告訴我另一種方式開始雜種請...啓動雜種服務器在終端

$script/server mongrel 

=> Booting Mongrel (use 'script/server webrick' to force WEBrick) 
=> Rails 2.2.2 application starting on http://0.0.0.0:3000 
=> Call with -d to detach 
=> Ctrl-C to shutdown server 
** Starting Mongrel listening at 0.0.0.0:3000 
Exiting 
/usr/lib/ruby/1.8/mongrel/tcphack.rb:12:in `initialize_without_backlog': Address already in use - bind(2) (Errno::EADDRINUSE) 
    from /usr/lib/ruby/1.8/mongrel/tcphack.rb:12:in `initialize' 
    from /usr/lib/ruby/1.8/mongrel.rb:93:in `new' 
    from /usr/lib/ruby/1.8/mongrel.rb:93:in `initialize' 
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:139:in `new' 
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:139:in `listener' 
    from /usr/lib/ruby/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:99:in `cloaker_' 
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:50:in `call' 
    from /usr/lib/ruby/1.8/mongrel/configurator.rb:50:in `initialize' 
    ... 19 levels... 
    from /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:49 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' 
    from /usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' 
    from script/server:3 
thanks 
kingston 

回答

4

的錯誤意味着你有其他的服務器已經在端口3000上運行的是退出該服務器或另一個端口上啓動雜種。

$ script/server mongrel -p 3001 
0

我就有這樣的經歷,當我開始雜種服務器,並使用Ctrl-CUbuntu的關閉雜種服務器時,服務器將不會關閉,我將無法啓動雜種服務器在直到有一段時間(或者直到系統重啓)爲止。所以,在運行混合服務器時不要退出終端。當你不得不關閉混合服務器時,使用Ctrl-Alt-Cubuntu