13

This was working just the other day, but I just updated my code to the review server which runs Passenger 2.2.4 and my 2.3.4 rails app now can't boot on that box.

Passenger reports:

Passenger encountered the following error:

The application spawner server exited unexpectedly: Unexpected end-of-file detected.

Exception class:
PhusionPassenger::Railz::ApplicationSpawner::Error
Backtrace:
#  File  Line  Location
0  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb  218  in `start'

1  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb  261  in `spawn_rails_application'

2  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb  126  in `lookup_or_add'

3  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb  255  in `spawn_rails_application'

4  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb  80  in `synchronize'

5  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb  79  in `synchronize'

6  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb  254  in `spawn_rails_application'

7  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb  153  in `spawn_application'

8  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb  286  in `handle_spawn_application'

9  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb  351  in `__send__'

10  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb  351  in `main_loop'

11  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb  195  in `start_synchronously'

12  /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server  61  

Any ideas?

Matteo Alessani
  • 10,264
  • 4
  • 40
  • 57
Trey Bean
  • 905
  • 3
  • 8
  • 19

2 Answers2

22

Figured it out. I finally checked the main apache error log and discovered there was a problem with one of my gems (facebooker config).

To fix the facebooker issue, make sure there's an entry for your environment in config/facebooker.yml

I think passenger should at least give an option to see more of the stack trace that gets reported in apache's error log. Would have been more helpful.

yolfer
  • 95
  • 1
  • 8
Trey Bean
  • 905
  • 3
  • 8
  • 19
  • Thanks for the answer! I had exactly the same issue, and you can imagine how much time I saved from your hint. In my case, I just forgot to run 'bundle install'. It's strange that passenger doesn't give more meaningful error messages for these type of common mistakes. – Dia Kharrat Jan 04 '11 at 18:11
  • Thanks, these must be a weird edge case. Passenger usually warns about this kind of issue. This issue appears to be caused by gems in the Gemfile which do not get installed to the default location (such as autotest-growl). – jvatic Feb 01 '11 at 19:47
  • This also happens with Nginx. I had a different gem conflict, but the Passenger error message gave no clue; looking in the Nginx error log revealed the problem. – Nathan Long Aug 02 '11 at 18:50
  • 3
    What if I can't check for Apache's error log (I don't have read access to them). How can I check what's wrong? – Deleteman Aug 17 '12 at 04:14
1

I got the same obscure error when I had forgotten to initialise the database. If so, try:

RAILS_ENV=production bundle exec rake db:setup
meesern
  • 2,518
  • 27
  • 29