Hi everyone im trying to make both elasticsearch and prosody be monitored with God both fail to start.
Resuting in
I [2012-09-06 09:22:18] INFO: Loading elasticsearch.god
I [2012-09-06 09:22:18] INFO: Syslog enabled.
I [2012-09-06 09:22:18] INFO: Using pid file directory: /var/run/god
I [2012-09-06 09:22:18] INFO: Started on drbunix:///tmp/god.17165.sock
I [2012-09-06 09:22:18] INFO: elasticsearch move 'unmonitored' to 'init'
I [2012-09-06 09:22:18] INFO: elasticsearch moved 'unmonitored' to 'init'
I [2012-09-06 09:22:18] INFO: elasticsearch [trigger] process is not running (ProcessRunning)
I [2012-09-06 09:22:18] INFO: elasticsearch move 'init' to 'start'
I [2012-09-06 09:22:18] INFO: elasticsearch start: service elasticsearch start
I [2012-09-06 09:22:28] INFO: elasticsearch moved 'init' to 'start'
I [2012-09-06 09:22:28] INFO: elasticsearch [ok] process is not running (ProcessRunning)
I [2012-09-06 09:22:28] INFO: elasticsearch [ok] tries within bounds [1/5] (Tries)
ETC
This is my prosody.god.rb file the rails root env is just path to my rails app wich is included in my app but could be easily removed.
What am I missing here that it won't start?
God.watch do |w|
w.interval = 30.seconds
w.start = "service prosody start"
w.stop = "service prosody stop"
w.restart = "#{w.stop} && #{w.start}"
w.start_grace = 10.seconds
w.restart_grace = 10.seconds
# w.log = File.join(ENV['RAILS_ROOT'], 'log', 'cumulus.log')
# determine the state on startup
w.transition(:init, {true => :up, false => :start}) do |on|
on.condition(:process_running) do |c|
c.running = true
end
end
# determine when process has finished starting
w.transition([:start, :restart], :up) do |on|
on.condition(:process_running) do |c|
c.running = true
c.interval = 5.seconds
end
# failsafe
on.condition(:tries) do |c|
c.times = 5
c.transition = :start
c.interval = 5.seconds
end
end
# start if process is not running
w.transition(:up, :start) do |on|
on.condition(:process_running) do |c|
c.running = false
end
end
end