`zeus start` fails #118

Closed
pcragone opened this Issue Sep 24, 2012 · 32 comments

Projects

None yet
@pcragone
$ zeus start
Starting Zeus server
[ready] [crashed] [running] [connecting] [waiting]
boot
└── default_bundle
    ├── development_environment
    │   └── prerake
    └── test_environment
        ├── cucumber_environment
        └── test_helper

Available Commands: [waiting] [crashed] [ready]
zeus console (alias: c)
zeus runner (alias: r)
zeus dbconsole
zeus rake
zeus server (alias: s)
zeus generate (alias: g)
zeus cucumber
zeus test (alias: rspec, testrb)
$
@benjamintanweihao

EDITED!

Does rails server work for you in the first place? I got tripped a few times because of this.

@pcragone

Yup! I've defaulted back to just running that since I can't get the zeus backend up and running

@Jeweller-Tsai

I've got the same trouble. I'm using ruby 1.9.3p194, rails 3.0.17 on OS X 10.8.2, it's stuck and can't ran other zeus commands

@benjamintanweihao

Have you patched your ruby using falcon and the backported GC?

On Fri, Sep 28, 2012 at 9:50 AM, Jeweller-Tsai notifications@github.comwrote:

I've got the same trouble. I'm using ruby 1.9.3p194, rails 3.0.17 on OS X
10.8.2, it's stuck and can't ran other zeus commands


Reply to this email directly or view it on GitHubhttps://github.com/burke/zeus/issues/118#issuecomment-8961069.

@pcragone

Nope - I haven't touched my ruby - is there something I should've done?

@benjamintanweihao

Oh yes. Zeus needs a patched ruby in order to work its magic. The
requirements state: Ruby 1.9.3+ with backported GC from Ruby 2.0 OR
Rubinius.* The instructions on how to get up and running are on this
gist: https://gist.github.com/1688857

On Fri, Sep 28, 2012 at 10:58 AM, Peter Ragone notifications@github.comwrote:

have i done what with the who now? I haven't touched my ruby - is there
something I should've done?


Reply to this email directly or view it on GitHubhttps://github.com/burke/zeus/issues/118#issuecomment-8962226.

@pcragone

Ah. Excellent. I did not notice that - it just worked until a few days ago. I shall try that - thanks!

@pcragone

Going through those instructions left me with an autoreconf error, which, after a little investigation, is due to autoreconf -f failing with:
configure.in:425: warning: underquoted definition of RUBY_TRY_CFLAGS
Any thoughts on this one?

@benjamintanweihao

What OS are you on? If you're Mac OSX, you probably need XCode 4.3 or gcc-osx-installer.

@pcragone

Ok... let me reinstall it. I've already built several packages with those; we'll see what happens here...

@pcragone

No dice. Reinstalling & rebooting, same error

@pcragone

I am now stuck on a different problem. I have zeus running just find with one project, but on a similar project zeus start simply marks everything as crashed and doesn't work. No errors, no logs. Just crashed.

@benjamintanweihao

rails server starts ok ?

@dogweather

Same issue, but I'm using the patched ruby. rvm list gives:

ruby-1.9.3-p194-perf [ x86_64 ]

Would it be possible for zeus to give a message to the effect that the ruby interp doesn't have the right facilities, if this is the case? Would make debugging this easier.

@pcragone

Ended up having multiple rails server issues. All good now.

@dogweather

FYI, I'm having much better luck on Ubuntu 12.10 than 12.04 LTS. Works pretty well - I was able to use it for the first time; I can understand the enthusiasm now. For some reason 12.04 doesn't agree with it. My development environment (rvm, ruby, code, etc.) is the same, but the underlying system obviously has different libraries.

@driv3r
driv3r commented Oct 30, 2012

I was having the same issue, it hanged on boot and you can't load anything. I found that running zeus with bundle exec solves the problem.

osx 10.8.2, rbenv with patched ruby 1.9.3-p194

@lukaso
lukaso commented Nov 1, 2012

Same problem. I have the patched ruby and waiting on test and rake with zeus with and without bundle exec. I've deleted the cucumber and testrb entries from zeus.json

@gphil
gphil commented Nov 1, 2012

I'm on Ruby 1.9.3p194-perf, Rails 3.2.8 on Mac OS X 10.7.5 and I'm seeing the same issue as the others above. However, if I downgrade to zeus 0.4.6, everything works fine. So, it's something that was added between then and now that is causing this issue (at least for me.)

@micho
micho commented Nov 1, 2012

@gphil I have the same problem! My full problem description:


Vanilla rails project working

zeus-0.12 working: I start a new vanilla rails project, init zeus and everything works normally. Here every command works.


My larger project, crashing

zeus-0.12 crashing: I set up my large project with dozens of gems with zeus init and zeus start. Zeus starts normally, but then when doing zeus console or any other command it locks the terminal. No input, no response. No logs that I could find (any idea of where to find them?).

Now if I try with zeus 0.4.6, doing gem uninstall zeus and gem install zeus -v=0.4.6, it works for the same project where it was crashing. Start bisect...

zeus-0.4.6 working. Everything works perfectly.

zeus-0.10 working. Terminal input doesn't display the prompt, but works otherwise.

zeus-0.11 crashing. Completely freezes console.

zeus-0.10.2 working. Terminal input doesn't display the prompt, but works otherwise.

@micho
micho commented Nov 1, 2012

So last working version for me is zeus-0.10.2. Running ruby-1.9.3-p286-perf, Rails 3.1.6, OSX 10.8.2.

@gphil
gphil commented Nov 2, 2012

@micho: Thanks for chiming in, it helped me track down the the issue. I too was able to use the latest version with a vanilla rails project, so I went into our main project and started pulling out gems.

During this process, I found that the mere inclusion of the gems was not the issue, but rather whether or not the following initializer for Resque ran:

rails_root = Rails.root || File.dirname(__FILE__) + '/../..'
rails_env = Rails.env || 'development'

resque_config = YAML.load_file(rails_root.to_s + '/config/resque.yml')
Resque.redis = resque_config[rails_env]

When I commented the above out, zeus worked fine. So, I figured it must have to do with setting up the connection to Redis. Normally in development I am not running a Redis server, so I tried uncommenting the code and firing up Redis and sure enough zeus worked perfectly after that. So, for me the issue was that when Resque couldn't connect to Redis, it caused zeus client connections to hang. I don't have to time to debug it any more at the moment, but I will probably come back to it and open a new issue specific to this when I have more information about what's going on.

@micho
micho commented Nov 2, 2012

Ah! That's the cause of the problem! 🍻

I was starting up my project (which uses Resque) with Redis turned off.. which made it crash, and crashed zeus.
Turning on Redis fixed the bug for me.

@micho
micho commented Nov 2, 2012

The question remains: why did zeus start crashing on it, when it didn't for version 0.10?

@lukaso
lukaso commented Nov 7, 2012

OK, for me, it was my config/inititializers/sidekiq.rb which was setting redis even when redis wasn't running. Now commented out (well, ifed out) and all works.

@Jeweller-Tsai

zeus-0.10.2 works for me :-)

OS X 10.8.2
1.9.3p194 perf
rails 3.0.17

2012/11/7 lukaso notifications@github.com

OK, for me, it was my config/inititializers/sidekiq.rb which was setting
redis even when redis wasn't running. Now commented out (well, ifed out)
and all works.


Reply to this email directly or view it on GitHubhttps://github.com/burke/zeus/issues/118#issuecomment-10142973.

@jessieay
jessieay commented Dec 3, 2012

@gphil @micho I think that I am experiencing the same problem with a Rails app using Redis. I've pinpointed the exact line in config/initializers/redis.rb that causes Zeus to hang, but when commented out all of my specs fail.

Any updates on the source of this issue?

@micho
micho commented Dec 3, 2012

Jessie, does it work if you boot redis before starting zeus?

On Monday, 3 de December de 2012 at 20:50, Jessie A. Young wrote:

@gphil (https://github.com/gphil) @micho (https://github.com/micho) I think that I am experiencing the same problem with a Rails app using Redis. I've pinpointed the exact line in config/initializers/redis.rb that causes Zeus to hang, but when commented out all of my specs fail.
Any updates on the source of this issue?


Reply to this email directly or view it on GitHub (#118 (comment)).

@burke
Owner
burke commented Dec 3, 2012

https://github.com/burke/zeus/blob/master/rubygem/lib/zeus/rails.rb#L222-L227

This would have been added after 0.10.0. It fixed some issue, but I can't remember the details anymore.

I'll try to dig into this at some point in the next few days.

@jessieay
jessieay commented Dec 4, 2012

I have Redis running.

I've tried uninstalling and re-installing Zeus many times but no luck. (v 0.12.0, but I've also tried other versions).

On zeus start everything is green except for test_helper (pink/connecting) and zeus test (yellow/waiting).

The line I comment out in config/initializers/redis.rb to make everything green is the line that instantiates my last Redis silo. But, even with all zeus commands green, 90% of of my specs fail when running zeus rake

Thanks for your help, @micho !! And for Zeus' awesomeness, @burke !

@burke
Owner
burke commented Dec 6, 2012

Just pushed a commit to master that will properly report errors that happen in after_fork or other phases of zeus booting stuff up, which is what all these are about. I'm going to close this and release 0.13.0 this evening. If you still have issues that don't immediately become blindingly obvious, please open a new issue :)

@burke burke closed this Dec 6, 2012
@rajesh38

@benjamintanweihao correct, for me it was a need of bundle install.
You can check the error that is shown when startin rails server. Solve the error and you are good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment