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

"exit status 1" on startup #237

Closed
rubysolo opened this issue Jan 11, 2013 · 102 comments
Closed

"exit status 1" on startup #237

rubysolo opened this issue Jan 11, 2013 · 102 comments
Labels

Comments

@rubysolo
Copy link

Hello--

I'm trying to get started with using Zeus in my workflow. My environment is OSX 10.7.5, Ruby 1.9.3-p327, Rails 3.2.11, Zeus version 0.13.2. When I execute "zeus start", I get the status screen with everything in waiting status. At the bottom of the screen, I get "exit status 1" briefly, then the commands shift down one line to cover it up, and it hangs in that state indefinitely. What can I do to troubleshoot?

@iRonin
Copy link

iRonin commented Jan 14, 2013

Same here.

@filiptepper
Copy link

Same happens here whenever I have zeus.json file present.

@jeffremer
Copy link

Same issue, but I have no zeus.json file.

  • Ruby 1.9.3-p362 (RBenv)
  • OSX 10.8.2
  • Rails 3.1.10
  • Zeus 0.13.2

I'd be happy to help dig in, not sure where to start. Is there something else I can provide?

@filiptepper
Copy link

I've managed to fix this on machine.

I'm running homebrew but had no go installed. After brewing go works like a charm.

$ brew update
$ brew install go

$ go version
go version go1.0.3

@filiptepper
Copy link

I don't have custom plan file, here's my zeus.json:

{
  "command": "ruby -rubygems -rzeus/rails -eZeus.go",

  "plan": {
    "boot": {
      "default_bundle": {
        "development_environment": {
          "prerake": {"rake": []},
          "console": ["c"],
          "generate": ["g"]
        },
        "test_environment": {
          "test_helper": {"test": ["rspec"]}
        }
      }
    }
  }
}

@rubysolo
Copy link
Author

It crashes for me with and without a zeus.json file, and I do have go v 1.0.3 installed.

@filiptepper
Copy link

Pretty much the same setup, except I'm running Mountain Lion.

@jeffremer
Copy link

I also did not have go, but installing go didn't help, same symptoms as before.

@rchampourlier
Copy link

Same thing here. Worked for some time, now I get the very same thing.

OS X 10.8.2
ruby 1.9.3p327-perf
rails 3.2.11
zeus 0.13.2
With a zeus.json file

@iRonin
Copy link

iRonin commented Feb 15, 2013

Whenever I get this error it's down to some gem conflicts or other Rails app errors.
Try to start rails server manually and see if it works.

@rchampourlier
Copy link

Starting the rails server was ok, but the zeus.json file was making it fail. Removed and it works again.

@MattRogish
Copy link

Removing zeus.json fixed it for me, too. 0.13.3.pre2

@froderik
Copy link

OSX 10.8.2
ruby 1.9.3-p392
rails 3.2.12
zeus 0.13.2
Removed zeus.json and now it works. Which is awesome!

@turadg
Copy link
Collaborator

turadg commented Feb 25, 2013

Sounds like this is fixed by removing an old zeus.json, so I'll close this.

@turadg turadg closed this as completed Feb 25, 2013
@rubysolo
Copy link
Author

Removing a zeus.json doesn't fix it for me, as I don't have one.

@turadg turadg reopened this Feb 25, 2013
@rubysolo
Copy link
Author

Thanks. Does anyone have suggestions for further troubleshooting steps?

@jeffremer
Copy link

Likewise, I don't have a zeus.json file and still get the same issue. I'm happy help to troubleshoot, any idea where to start looking?

@turadg
Copy link
Collaborator

turadg commented Mar 4, 2013

Is everyone still having this problem with v0.13.3.rc2 (try gem install zeus -v 0.13.3.rc2 --pre).

@jeffremer
Copy link

@turadg, gem update zeus doesn't give me any updates from 0.13.2, but gem install zeus --version=0.13.3.rc2 installs however it doesn't seem to solve the problem.

In a fresh rails app zeus appears to boot up OK. In our app this problem persists, even though rails s works just fine.

Any ideas where I can start debugging this? Zeus has worked great for me in the past so I'd love to keep using it and I am more than happy to help out.

@turadg
Copy link
Collaborator

turadg commented Mar 4, 2013

Thanks for the correction; I just revised my comment above.

For debugging, unfortunately Zeus doesn't yet log any output or indicate why it hangs or crashes.

Can you describe a minimal test case that I could try to replicate locally?

@jeffremer
Copy link

I'm trying to narrow down the cause of the issue by slowly removing initialization code and dependencies from our app, unfortunately it's a huge project and this is taking a while.

If I forked zeus myself in order to add some logging, do you have any pointers on a place to start for adding some debugging output?

@turadg
Copy link
Collaborator

turadg commented Mar 5, 2013

@jeffremer Maybe better to start from minimal and build up? Does Zeus work for you on a fresh app?

For debugging, you could start with zeus.rb and put a puts at the entry of each method to trace the execution.

@jeffremer
Copy link

Yeah, I tried that. Zeus works for me on a fresh rails app, then after copying over our Gemfile and running bundler, and it still works after slowly starting to add more and more of our app into a fresh app. Didn't really get anywhere with that.

I'll give stepping through zeus.rb a try. Thanks.

@marktran
Copy link

marktran commented Mar 7, 2013

Same deal here with p327-perf and no zeus.json and go1.0.3. Interestingly, it works fine for my coworker on the same project.

@alce
Copy link

alce commented Mar 14, 2013

I had this problem too. Solved it by removing zeus from my Gemfile.

@keithpitt
Copy link

I had this problem as well, it seems that I had accidentally removed my custom_plan.rb file in a bad merge. Doing a zeus init again worked for me.

@martinstreicher
Copy link

I removed the zeus gem from my Gemfile and it started working again. The Gemfile had zeus in it since I started using the zeus utility. Not sure what changed.

@adstage-david
Copy link

This just happened to me as well. I removed my custom_plan and the -r./custom_plan.rb reference in zeus.json because I didn't see a need for them, but it appears zeus needs the reference to the

require 'zeus/rails'

Line at the top of the custom_plan.rb. Changing -r./custom_plan.rb to -rzeus/rails allowed me to remove the custom_plan.rb file.

@ssoroka-se
Copy link

There's a lot of "try this" in here, but no actual debugging steps. Here's how you can find the actual issue:

zeus --log ZEUS.LOG start then cat ZEUS.LOG

@markalfred
Copy link

@ssoroka-se 👍 👍 👍 👍 ❗

@carlomallone
Copy link

@marcpursals
Thanks for the advice. This worked for me.

@MaximilianoFelice
Copy link

Still getting this error after trying every possible combination of answers in this issue.

Does anyone have an idea of where this bug is comming from? It's been more than two years from the original post and it doesn't seem to be any official solution.

@ntdb
Copy link

ntdb commented Jul 6, 2015

@marcpursals this worked for me as well. Thanks!

@aeberlin
Copy link

I had this issue with zeus-parallel_tests but none of the steps above resolved it. After checking my logs, load_file wasn't being found in load_tracking.rb, with a custom plan. I fixed it by running bundle update psych and adding require 'yaml' to the top of my custom plan.

@radar
Copy link

radar commented Nov 20, 2015

I just got this today. Following @ssoroka-se's advice, I see this:

2015/11/21 10:21:58.583514 [/Users/nick/Work/gopath/src/github.com/burke/zeus/go/processtree/slavenode.go:184] boot/(no PID) in unbooted state
2015/11/21 10:21:58.584299 [/Users/nick/Work/gopath/src/github.com/burke/zeus/go/processtree/slavenode.go:372] boot/(no PID) running the root command now
2015/11/21 10:21:58.739034 [/Users/nick/Work/gopath/src/github.com/burke/zeus/go/processtree/slavenode.go:383] boot/(no PID) root process exited with an error before it could boot: exit status 1; output was: /Users/ryanbigg/.gem/ruby/2.2.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:58:in `alias_method': undefined method `load_file' for class `Module' (NameError)
        from /Users/ryanbigg/.gem/ruby/2.2.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:58:in `singleton class'
        from /Users/ryanbigg/.gem/ruby/2.2.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:57:in `<module:YAML>'
        from /Users/ryanbigg/.gem/ruby/2.2.3/gems/zeus-0.15.4/lib/zeus/load_tracking.rb:56:in `<top (required)>'
        from /Users/ryanbigg/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/ryanbigg/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/ryanbigg/.gem/ruby/2.2.3/gems/zeus-0.15.4/lib/zeus.rb:13:in `<top (required)>'
        from /Users/ryanbigg/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/ryanbigg/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:69:in `require'
        from /Users/ryanbigg/.gem/ruby/2.2.3/gems/zeus-0.15.4/lib/zeus/rails.rb:12:in `<top (required)>'
        from /Users/ryanbigg/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `require'
        from /Users/ryanbigg/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:128:in `rescue in require'
        from /Users/ryanbigg/.rubies/ruby-2.2.3/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:39:in `require'

@radar
Copy link

radar commented Nov 24, 2015

Removing method_source 0.8.2 and using method_source 0.8.1 fixed this issue for me.

@pietdaniel
Copy link

Im still receiving this error, I have a zeus.json which when I remove the error is resolved. I can also empty and reinstall my gemset which revolves the issue but this can be rather cumbersome. Here is the output from the zeus log:

2016/01/04 10:13:39.934241 [/Users/nick/Work/gopath/src/github.com/burke/zeus/go/processtree/slavenode.go:184] boot/(no PID) in unbooted state
2016/01/04 10:13:39.934709 [/Users/nick/Work/gopath/src/github.com/burke/zeus/go/processtree/slavenode.go:372] boot/(no PID) running the root command now
2016/01/04 10:13:40.705920 [/Users/nick/Work/gopath/src/github.com/burke/zeus/go/processtree/slavenode.go:383] boot/(no PID) root process exited with an error before it could boot: exit status 1; output was: /Users/piet/.rvm/gems/ruby-2.2.3@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:34:in `block in setup': You have already activated faraday 0.9.2, but your Gemfile requires faraday 0.9.1. Prepending `bundle exec` to your command may solve this. (Gem::LoadError)
        from /Users/piet/.rvm/gems/ruby-2.2.3@global/gems/bundler-1.10.6/lib/bundler/runtime.rb:19:in `setup'
        from /Users/piet/.rvm/gems/ruby-2.2.3@global/gems/bundler-1.10.6/lib/bundler.rb:127:in `setup'
        from /Users/piet/.rvm/gems/ruby-2.2.3@global/gems/bundler-1.10.6/lib/bundler/setup.rb:18:in `<top (required)>'
        from /Users/piet/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
        from /Users/piet/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'

@richkettle
Copy link

I have found that this can occur when switching gemsets but not exiting the current dir.

@bf4
Copy link

bf4 commented Feb 6, 2017

For me, the issue was the json gem. I have zeus installed outside of my app and not in the gemfile.

zeus --log ZEUS.LOG start

then cat ZEUS.LOG showed

~/.rvm/rubies/ruby-2.2.5/lib/ruby/site_ruby/2.2.0/rubygems/dependency.rb:315:in `to_specs': 
Could not find 'json' (= 1.8.6) - did find: [json-1.8.3,json-1.8.1] (Gem::LoadError)

then gem install json -v '1.8.6' and I could start zeus again!

On CRuby 2.2.5.

My Gemfile has the json gem locked to 1.8.6, which I guess matters because of some breaking changes in that version

@Catharz
Copy link

Catharz commented Jul 12, 2017

@bf4's solution resolved for me in a round-about way.

The logs pointed to having multiple versions of pry installed. The Gemfile one was earlier than the system Ruby version. Uninstalling the system Ruby version of pry resolved the issue.

@mooreds
Copy link

mooreds commented Sep 25, 2017

So, I ran into this same issue, again with versions of gems (pry in particular, but I only went part way down the path of tracking the exact gems) being different in the system and in the Gemfile.lock. I'd previously done a 'bundle update' and even when I re checked out the Gemfile.lock and did a bundle install, the newer versions were being picked up by zeus.

For future reference, I solved this by re-installing rvm to clean up my entire path, and then running bundle install.

@AnwarShah
Copy link

For me, the problem was I had coderay 1.12 and 1.11 installed, one for rails5 and another for rails4. I've installed both gems on default gemset and zeus was trying to use coderay 1.12 which caused problem. I found that by running zeus --log /dev/stderr start command.

Then I've created another gemset for rails4 only and installed the gems again. Now, it's starting just fine, since I'm using this gemset.

I used this guide to create the gemset. It's quite easy https://rvm.io/gemsets/creating

@rachel-carvalho
Copy link

I'm just leaving this here for other people who might be having the same problem. I'm on zeus v0.15.15.pre since November, but when I updated to ruby 2.5, I started seeing the error cannot load such file -- ubygems (LoadError), just like @Goltergaul above.

My error message didn't say anything about zeus.json, but his did, so I looked at my zeus.json file and the problem was that my command seemed to have the wrong syntax. So I changed from:

"command": "ruby -rubygems -r./zeus_custom_plan -eZeus.go"

to

"command": "ruby -r rubygems -r ./zeus_custom_plan -e Zeus.go"

And it's now working.

@AndrzejJantos
Copy link

Hello,
I had installed new Ruby version 2.5.0 on my mac and zeus is breaking on this error.
Nothing is helping, even on total new rails app, it doesn't work. Please help :)

@sobrinho
Copy link

sobrinho commented Jun 5, 2018

I'm seeing this:

/Users/sobrinho/.rbenv/versions/2.4.1/lib/ruby/site_ruby/2.4.0/rubygems/specification.rb:2322:in `check_version_conflict': can't activate method_source-0.8.2, already activated method_source-0.9.0 (Gem::LoadError)

@edk
Copy link

edk commented Sep 20, 2018

Using ruby 2.5.1 and rails 5, the more recent comments above pointed me to:

zeus --log ZEUS.LOG start

which showed a require problem. The ruby line from zeus init created:

  "command": "ruby -rubygems -r./custom_plan -eZeus.go",

which should be

  "command": "ruby -rrubygems -r./custom_plan -eZeus.go",

That fixed my issue

@adfineberg
Copy link

I had the same as @sobrinho (with different versions of method_source) - did these steps which worked:

  1. I removed the relevant gems from my Gemfile that used method_source (in my case it was only pry, check in Gemfile.lock).
  2. Run bundle
  3. Add the gems back
  4. Run bundle once again
  5. zeus start

@os6sense
Copy link

Just came to mention this issue and the solution - suprised its unfixed ...

@zhisme
Copy link

zhisme commented Nov 19, 2019

@edk pointed out the fix.
and the issue comes from here.

https://thoughtbot.com/blog/improving-rails-boot-time-with-zeus#set-up

@vassyz
Copy link

vassyz commented Jan 31, 2020

What I did to fix can't activate method_source-0.8.2, already activated method_source-0.9.2:

gem uninstall method_source -v 0.9.2

It's because I had multiple pry versions installed on my machine. Hopefully the activated version of the gem is not a hard dependency for your project.

@shimaamarzouk
Copy link

shimaamarzouk commented May 19, 2020

Thanks @ssoroka-se for the debugging tip
Changing "command": "ruby -r -r./custom_plan -eZeus.go", to "command": "ruby -r ./custom_plan -eZeus.go", in zeus.json solved in my case

@diegoesp
Copy link

There's a lot of "try this" in here, but no actual debugging steps. Here's how you can find the actual issue:

zeus --log ZEUS.LOG start then cat ZEUS.LOG

This is the real answer. The "exit status 1" is just a symptom of multiple possible causes. In my case, I tried logging and detected that my gem system was broken. I just did 'gem update --system' and I got zeus working again. But most likely this was just for me.

@ka8725
Copy link

ka8725 commented Apr 20, 2022

Seems removing the "wrong" gem version is the only way to go, it's even within bundler official docs https://bundler.io/man/bundle-exec.1.html#RUBYGEMS-PLUGINS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests