上帝没有运行:服务器不可用(或者您没有权限访问它)

时间:2014-11-21 14:28:44

标签: ruby-on-rails ruby resque god

我正试图让上帝启动我的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

2 个答案:

答案 0 :(得分:5)

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

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

这是执行上帝的命令:

god -c config/resque.god

答案 1 :(得分:2)

通过执行以下操作,查看上帝服务的运行方式: ps aux | grep god

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

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

相关问题