【问题标题】:Foreman exits with code 0?工头以代码 0 退出?
【发布时间】:2012-12-13 00:09:01
【问题描述】:

我安装了 Foreman gem,以便在每次运行我的应用程序时启动 Sunspot:

过程文件:

search: bundle exec rake sunspot:solr:start

这是输出:

alex@alex-K43U:~/rails/inkleak$ foreman start
08:05:09 search.1 | started with pid 5278
08:05:35 search.1 | java version "1.6.0_24"
08:05:35 search.1 | OpenJDK Runtime Environment (IcedTea6 1.11.5) (6b24-1.11.5-0ubuntu1~11.10.1)
08:05:35 search.1 | OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)
08:05:35 search.1 | Removing stale PID file at /home/alex/rails/inkleak/solr/pids/development/sunspot-solr-development.pid
08:05:35 search.1 | Successfully started Solr ...
08:05:35 search.1 | exited with code 0
08:05:35 system   | sending SIGTERM to all processes
SIGTERM received

可能是什么问题?

(顺便说一句,当我使用 rake sunspot:solr:start 时,Sunspot 运行良好)

【问题讨论】:

    标签: ruby-on-rails sunspot foreman


    【解决方案1】:

    sunspot:solr:start 任务将 Solr 分叉到后台并立即退出。这不适用于 Foreman,它假定一个长期运行的前台进程。

    你想要的是sunspot:solr:run,它将在前台运行 Solr,允许 Foreman 管理进程。

    或者,如果我可以这么大胆,你也可以考虑一个cloud hosted Solr search,比如我自己不起眼的websolr.com

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-04-25
      • 1970-01-01
      • 2014-01-05
      • 1970-01-01
      • 2014-06-24
      • 2017-01-19
      • 1970-01-01
      相关资源
      最近更新 更多