dugsq / xenograte-xct

Xenograte Community Toolkit (XCT)
Other
19 stars 5 forks source link

trying to rerun an already running xenode doesn't detect that redis server is not running #9

Open ghost opened 11 years ago

ghost commented 11 years ago
  1. start redis-server
  2. run a xenode
  3. stop or kill redis-server
  4. try to execute 2. again

what you see is this:

atkaaz@atkaaz-VirtualBox ~/xenograte-xct $ ./1
execute options: {:global=>{:options=>{:verbosity=>"WARN", :error_output_format=>"basic", :version=>false, :help=>false}, :commands=>{:run=>{:options=>{:version=>false, :help=>false}, :commands=>{:xenode=>{:options=>{:xenode_id=>"xenode_1", :xenode_file=>"hello_world_xenode", :xenode_klass=>"HelloWorldXenode", :version=>false, :help=>false, :xenode_id_given=>true, :xenode_file_given=>true, :xenode_klass_given=>true}, :commands=>{}}}}}}} arguments: []
lib_dir: #<Pathname:/home/atkaaz/xenograte-xct/lib>
Config file exists /home/atkaaz/xenograte-xct/run/xenodes/xenode_1/config.yml
Starting Xenode: xenode_1
pid_path: /home/atkaaz/xenograte-xct/run/pids/xenode_1_pid
pid is "22347"
Xenode xenode_1 is running.
  1. However when sending a message to it, you do see that the redis server is down:
atkaaz@atkaaz-VirtualBox ~/xenograte-xct $ bin/xeno write message -i xenode_1
#<Redis::CannotConnectError: Error connecting to Redis on 127.0.0.1:6379 (ECONNREFUSED)> ["/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:276:in `rescue in establish_connection'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:271:in `establish_connection'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:69:in `connect'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:290:in `ensure_connected'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:177:in `block in process'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:256:in `logging'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:176:in `process'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis/client.rb:84:in `call'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis.rb:902:in `block in lpush'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis.rb:36:in `block in synchronize'", "/home/atkaaz/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis.rb:36:in `synchronize'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/redis-3.0.4/lib/redis.rb:901:in `lpush'", "/home/atkaaz/xenograte-xct/lib/xeno_cli.rb:400:in `execute'", "bin/xeno:105:in `block (4 levels) in <main>'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/escort-0.4.0/lib/escort/app.rb:68:in `call'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/escort-0.4.0/lib/escort/app.rb:68:in `execute_action'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/escort-0.4.0/lib/escort/app.rb:55:in `execute'", "/home/atkaaz/.rvm/gems/ruby-2.0.0-p247/gems/escort-0.4.0/lib/escort/app.rb:6:in `create'", "bin/xeno:18:in `<main>'"]
atkaaz@atkaaz-VirtualBox ~/xenograte-xct $ 

I guess this isn't that important (that is, to have xeno tell you that the redis server isn't running when you're trying to rerun an already running xenode) ...

dougsq commented 11 years ago

Thanks, we noticed that too. As you know we are working hard getting the Beta ready so we haven't fixed it yet. I marked it as a bug. It should check and let you know cause the Xenoflow won't do anything if the data isn't flowing.