Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I deployed a Rails app to a Red Hat server. It worked fine for over a week and then the server was automatically restarted during the weekend and now the app won't work.

I was getting this error:

[Mon Jun 17 09:51:17 2013] [error] [client 10.999.999.999] Directory index forbidden by Options directive: /var/www/html/current/public/
[Mon Jun 17 09:53:31 2013] [error] [client 10.999.999.999] File does not exist: /var/www/html/current/public/users
[Mon Jun 17 09:55:48 2013] [error] Exception KeyError: KeyError(140599859124192,) in <module 'threading' from '/usr/lib64/python2.6/threading.pyc'> ignored
[Mon Jun 17 09:55:48 2013] [error] Exception KeyError: KeyError(140599859124192,) in <module 'threading' from '/usr/lib64/python2.6/threading.pyc'> ignored
[Mon Jun 17 09:55:48 2013] [error] Exception KeyError: KeyError(140599859124192,) in <module 'threading' from '/usr/lib64/python2.6/threading.pyc'> ignored

Then I temporarily set SELinux to Permissive mode. Now I get this error message:

[ 2013-06-17 10:48:31.9486 6414/7f3911c42700 Pool2/Spawner.h:739 ]: [App 7278 stdout] 
[ 2013-06-17 10:48:31.9603 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr] /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1070:in `require'
[ 2013-06-17 10:48:31.9604 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr] : 
[ 2013-06-17 10:48:31.9604 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr] closed stream
[ 2013-06-17 10:48:31.9605 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr]  (
[ 2013-06-17 10:48:31.9605 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr] IOError
[ 2013-06-17 10:48:31.9605 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr] )
[ 2013-06-17 10:48:31.9605 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr]   from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1070:in `<module:Gem>'
[ 2013-06-17 10:48:31.9606 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr]   from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:114:in `<top (required)>'
[ 2013-06-17 10:48:31.9606 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr]   from <internal:gem_prelude>:1:in `require'
[ 2013-06-17 10:48:31.9606 6414/7f391125b700 Pool2/Spawner.h:159 ]: [App 7278 stderr]   from <internal:gem_prelude>:1:in `<compiled>'
[ 2013-06-17 10:48:31.9639 6414/7f3911c42700 Pool2/Implementation.cpp:774 ]: Could not spawn process for group /var/www/html/current#default: An error occurred while starting up the preloader. It sent an unknown response type "".
     in 'void Passenger::ApplicationPool2::SmartSpawner::throwPreloaderSpawnException(const std::string&, Passenger::SpawnException::ErrorKind, Passenger::ApplicationPool2::Spawner::BackgroundIOCapturerPtr&, const Passenger::ApplicationPool2::Spawner::DebugDirPtr&)' (SmartSpawner.h:150)
     in 'std::string Passenger::ApplicationPool2::SmartSpawner::negotiatePreloaderStartup(Passenger::ApplicationPool2::SmartSpawner::StartupDetails&)' (SmartSpawner.h:582)
     in 'void Passenger::ApplicationPool2::SmartSpawner::startPreloader()' (SmartSpawner.h:206)
     in 'virtual Passenger::ApplicationPool2::ProcessPtr Passenger::ApplicationPool2::SmartSpawner::spawn(const Passenger::ApplicationPool2::Options&)' (SmartSpawner.h:744)
     in 'void Passenger::ApplicationPool2::Group::spawnThreadRealMain(const Passenger::ApplicationPool2::SpawnerPtr&, const Passenger::ApplicationPool2::Options&, unsigned int)' (Implementation.cpp:707)

[ 2013-06-17 10:48:31.9641 6414/7f3912684700 agents/HelperAgent/RequestHandler.h:1889 ]: [Client 20] Cannot checkout session. An error occurred while starting up the preloader. It sent an unknown response type "".
Error page:

/usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1070:in `require': closed stream (IOError)
  from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:1070:in `<module:Gem>'
  from /usr/local/lib/ruby/site_ruby/1.9.1/rubygems.rb:114:in `<top (required)>'
  from <internal:gem_prelude>:1:in `require'
  from <internal:gem_prelude>:1:in `<compiled>'

I had this problem before and I had to re-install Ruby and Rubygems and it started working again. I have done that twice and I'm tired of doing that. I have looked extensively for the reason of the error and for a solution but I haven't found it yet. How can I fix this?

rubygems.rb:1070:in `require': closed stream (IOError)
share|improve this question
    
Which spawn method are you using? And do you use PassengerPreStart? –  fsoppelsa Jun 19 '13 at 10:49
    
I installed passenger the standard way with 'passenger-install-apache2-module'. I get the error when I run any gem command such as gem -v. I think it has something to do with RUBYLIB like Ruby doesn't know how to use the include method. –  leonel Jun 20 '13 at 14:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.