God not running: The server is not available (or you do not have permissions to access it)

北城余情 提交于 2019-12-05 01:04:26

问题


I'm attempting to get god to start up my resque queue. However when I run god load config/resque.god it returns The server is not available (or you do not have permissions to access it)

This is my resque.god file:

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

回答1:


god load is use for loading or reloading configurations into an already running instance.

In your case, your god server is not running.

Here's the command to run god:

god -c config/resque.god



回答2:


Check out who the god service is running as by doing: ps aux | grep god

There's a good chance you'll see god running as root.

If you stop this service is restart by the same user as your running resque you should no longer see this error.



来源:https://stackoverflow.com/questions/27063623/god-not-running-the-server-is-not-available-or-you-do-not-have-permissions-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!