trying to run redis true god.rb but it fails "redis could not deregister: no cached PID or PID"

69 views
Skip to first unread message

rubybox

unread,
Jan 21, 2013, 10:13:22 AM1/21/13
to god...@googlegroups.com

Trying to run redis true god.rb but it fails.
It runs but in log file it shows this message, is there a way to fix this and what does it mean exactly?

E [2013-01-21 15:01:06] ERROR: redis could not deregister: no cached PID or PID file /var/run/god/redis.pid (ProcessExits)
[root@dev config]# cat /var/run/god/redis.pid

the pid file exists though


redis.conf

daemonize no
pidfile /var/run/redis.pid
logfile stdout
 
port 6379
bind 127.0.0.1
timeout 300
 
loglevel notice
 
## Default configuration options
databases 16
 
save 900 1
save 300 10
save 60 10000
 
rdbcompression yes
dbfilename dump.rdb
 
dir /usr/local/bin/
appendonly no


redis.god.rb

# gracefully restart redis or it will loose data!
redis_root = "/usr/local/bin"

%w{6379}.each do |port|
  God.watch do |w|
    w.name = "redis"
    w.interval = 30.seconds
    w.start = "#{redis_root}/redis-server /srv/books/current/config/redis.conf"
    w.stop = "#{redis_root}/redis-cli -p #{port} shutdown"
    w.restart = "#{w.stop} && #{w.start}"
    w.start_grace = 10.seconds
    w.restart_grace = 10.seconds
    w.log = File.join(ENV['RAILS_ROOT'], 'log', 'redis.log')

    w.start_if do |start|
      start.condition(:process_running) do |c|
        c.interval = 5.seconds
        c.running = false
      end
    end

    # Notifications
    # --------------------------------------
    w.transition(:up, :start) do |on|
      on.condition(:process_exits) do |p|
        p.notify = 'dev'
      end
    end

  end
end



Reply all
Reply to author
Forward
0 new messages