God not running: The server is not available (or y

2019-03-31 01:35发布

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

2条回答
乱世女痞
2楼-- · 2019-03-31 02:18

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
查看更多
祖国的老花朵
3楼-- · 2019-03-31 02:23

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.

查看更多
登录 后发表回答