Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

daemon_controller not worked for me. #12

Open
zw963 opened this issue Mar 17, 2015 · 0 comments
Open

daemon_controller not worked for me. #12

zw963 opened this issue Mar 17, 2015 · 0 comments

Comments

@zw963
Copy link

zw963 commented Mar 17, 2015

I have read README, it is fancy.

But it seem like not worked for me.

I have a redis-server binary file in $PATH, /usr/local/bin/redis-server.

if I start redis with redis-server ./redis.conf, it worked for me.
it will start up a background redis-server process, and accept response.

But I invoke with daemon_controller:

#!/usr/bin/env ruby
# -*- coding: utf-8 -*-

require 'daemon_controller'

controller = DaemonController.new(
  :identifier => 'Redis process',
  :start_command => "redis-server /home/zw963/redis.conf",
  # :before_start => method(:before_start),
  :ping_command => [:tcp, 'localhost', 6379],
  :pid_file => 'redis.pid',
  :log_file => 'redis.log',
  :start_timeout => 5)

controller.start

it always failed with:

/home/zw963/Dropbox/common/ruby/gems/daemon_controller.rb:407:in `start_without_locking': Daemon 'Redis process' failed to start in time. (DaemonController::StartTimeout)
    from /home/zw963/Dropbox/common/ruby/gems/daemon_controller.rb:218:in `block in start'
    from /home/zw963/Dropbox/common/ruby/gems/daemon_controller/lock_file.rb:68:in `block in exclusive_lock'
    from /home/zw963/Dropbox/common/ruby/gems/daemon_controller/lock_file.rb:63:in `open'
    from /home/zw963/Dropbox/common/ruby/gems/daemon_controller/lock_file.rb:63:in `exclusive_lock'
    from /home/zw963/Dropbox/common/ruby/gems/daemon_controller.rb:217:in `start'
    from 1.rb:15:in `<main>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant