【问题标题】:start mongrel server in terminal在终端启动杂种服务器
【发布时间】:2011-06-29 16:58:45
【问题描述】:

如果我启动 mongrel,就会出现错误。我能做些什么? 请告诉我另一种启动 Mongrel 的方法...

$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

【问题讨论】:

    标签: ruby-on-rails mongrel mongrel-cluster


    【解决方案1】:

    该错误表示您已经在端口 3000 上运行了另一个服务器。请退出该服务器或在另一个端口上启动 Mongrel。

    $ script/server mongrel -p 3001
    

    【讨论】:

      【解决方案2】:

      我有这样的经验,当我在ubuntu中启动mongrel服务器并使用Ctrl-C关闭mongrel服务器时,服务器不会关闭,我将无法启动mongrel服务器在同一个端口,直到一段时间(或者可能直到系统重新启动)。因此,在运行混合服务器时不要退出终端。当您必须关闭 mongrel 服务器时,请在 ubuntu 中使用 Ctrl-Alt-C

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2017-06-24
        • 1970-01-01
        • 2018-08-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多