I am getting some 500 errors in my Passenger Rails app. When looking at the log it appears passenger cannot access the /tmp dir. I have validated that it is there and has RW access to root, and then tried www-data. What is going on here?
2014-01-14 16:01:16.6573 20624/7fa7c8806700 Pool2/SmartSpawner.h:301 ]: Preloader for /var/www/socialrest_homepage started on PID 20686, listening on unix:/tmp/passenger.1.0.20618/generation-0/backends/preloader.20686
App 20704 stdout:
[Tue Jan 14 16:01:17 2014] [error] [client 168.215.171.129] Premature end of script headers:
App 20686 stderr: /usr/local/rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/tmpdir.rb:34:in `tmpdir': could not find a temporary directory (ArgumentError)
App 20686 stderr: from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/lib/phusion_passenger/utils/tmpio.rb:17:in `new'
App 20686 stderr: from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/lib/phusion_passenger/utils/tee_input.rb:99:in `initialize'
App 20686 stderr: from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/lib/phusion_passenger/rack/thread_handler_extension.rb:55:in `new'
App 20686 stderr: from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/lib/phusion_passenger/rack/thread_handler_extension.rb:55:in `process_request'
App 20686 stderr: from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/lib/phusion_passenger/request_handler/thread_handler.rb:141:in `accept_and_process_next_request'
App 20686 stderr: from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/lib/phusion_passenger/request_handler/thread_handler.rb:109:in `main_loop'
App 20686 stderr: from /usr/local/rvm/gems/ruby-2.0.0-p353/gems/passenger-4.0.33/lib/phusion_passenger/request_handler.rb:440:in `block (3 levels) in start_threads'
[ 2014-01-14 16:01:21.0163 20624/7fa7cb242700 Pool2/Pool.h:776 ]: Process (pid=20704, group=/var/www/socialrest_homepage#default) no longer exists! Detaching it from the pool.
App 20720 stdout:
Here are my current /tmp, and config/environment.rb ownerships:
drwxrwxrwx 5 root root 4.0K Jan 14 16:01 tmp
-rwxr-xr-x 1 root root 196 Jan 13 20:06 environment.rb
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…