【问题标题】:God not running: The server is not available (or you do not have permissions to access it)God not running:服务器不可用(或您无权访问它)
【发布时间】:2015-01-19 17:34:45
【问题描述】:

我正试图让上帝启动我的 resque 队列。但是,当我运行 god load config/resque.god 时,它会返回 The server is not available (or you do not have permissions to access it)

这是我的 resque.god 文件:

rails_env   = ENV['RAILS_ENV']  || "production"
rails_root  = ENV['RAILS_ROOT'] || "/Users/andrewlynch/sites/wellness/wellbot"
God.watch do |w|    
 w.name     = "resque-worker"
 w.group    = "resque"
 w.interval = 60.seconds
 w.dir = "#{rails_root}"
 w.start    = "RAILS_ENV=development QUEUE=* rake resque:work"
 w.start_grace = 30.seconds   
end

【问题讨论】:

    标签: ruby-on-rails ruby resque god


    【解决方案1】:

    通过以下方式查看上帝服务的运行身份: ps辅助| grep 神

    你很有可能会看到上帝以 root 身份运行。

    如果您停止此服务由与您运行的 resque 相同的用户重新启动,您应该不会再看到此错误。

    【讨论】:

      【解决方案2】:

      god load 用于将配置加载或重新加载到已运行的实例中。

      在你的情况下,你的上帝服务器没有运行。

      这是运行上帝的命令:

      god -c config/resque.god
      

      【讨论】:

        猜你喜欢
        • 2013-06-30
        • 2019-02-22
        • 2017-05-04
        • 2015-10-06
        • 2015-10-07
        • 2012-12-08
        • 2017-05-30
        相关资源
        最近更新 更多