puppet 2.6.0 vs apache/mod_passenger

66 views
Skip to first unread message

Russell Jackson

unread,
Aug 2, 2010, 1:17:23 PM8/2/10
to puppet...@googlegroups.com
I'm having a hell of a time with mod_passenger. Where would I even begin
to investigate where this exception is coming from? My configuration
works fine with the 2.6.0 webrick server.

> [Thu Jul 29 18:03:00 2010] [error] [client 136.168.1.4] Premature end of script headers: preamble
> [ pid=28460 file=ext/apache2/Hooks.cpp:735 time=2010-07-29 18:03:00.77 ]:
> The backend application (process 30417) didn't send a valid HTTP response. It might have crashed during the middle of sending an HTTP response, so please check whether there are crashing problems in your application. This is the data that it sent: [Content-Type]
> *** Exception NoMethodError in PhusionPassenger::Rack::ApplicationSpawner (undefined method `each' for 3238:Fixnum) (process 30417):
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/rack/request_handler.rb:100:in `process_request'
> from /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/utils.rb:278:in `each'
> from /usr/local/lib/ruby/gems/1.8/gems/rack-1.1.0/lib/rack/utils.rb:277:in `each'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/rack/application_spawner.rb:120:in `run'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/rack/application_spawner.rb:65:in `spawn_application'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/utils.rb:252:in `safe_fork'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/rack/application_spawner.rb:58:in `spawn_application'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/rack/application_spawner.rb:41:in `spawn_application'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:150:in `spawn_application'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `__send__'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
> from /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.15/bin/passenger-spawn-server:61


--
Russell A Jackson <r...@csub.edu>
Network Analyst
California State University, Bakersfield

Christopher Johnston

unread,
Aug 2, 2010, 1:26:47 PM8/2/10
to puppet...@googlegroups.com
Can you paste gem list?


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.


Russell Jackson

unread,
Aug 2, 2010, 1:25:52 PM8/2/10
to puppet...@googlegroups.com, Christopher Johnston
On 08/02/2010 10:26 AM, Christopher Johnston wrote:
> Can you paste gem list?

# gem list

*** LOCAL GEMS ***

actionmailer (2.3.8)
actionpack (2.3.8)
activerecord (2.3.8)
activeresource (2.3.8)
activesupport (2.3.8)
fastthread (1.0.7)
passenger (2.2.15)
rack (1.1.0)
rails (2.3.8)
rake (0.8.7)
ruby-augeas (0.3.0)
sources (0.0.2)

>
> On Mon, Aug 2, 2010 at 1:17 PM, Russell Jackson <r...@csub.edu> wrote:
>
>> I'm having a hell of a time with mod_passenger. Where would I even begin
>> to investigate where this exception is coming from? My configuration
>> works fine with the 2.6.0 webrick server.
>>

Christopher Johnston

unread,
Aug 2, 2010, 1:35:37 PM8/2/10
to Russell Jackson, puppet...@googlegroups.com
Looks good from what I can tell, did you setup the config.ru?

Russell Jackson

unread,
Aug 2, 2010, 1:32:29 PM8/2/10
to Christopher Johnston, puppet...@googlegroups.com
On 08/02/2010 10:35 AM, Christopher Johnston wrote:
> Looks good from what I can tell, did you setup the config.ru?
>

Yep. Got the modified one for the puppetmaster -> server class rename.

Russell Jackson

unread,
Aug 2, 2010, 1:38:39 PM8/2/10
to puppet...@googlegroups.com, Christopher Johnston
On 08/02/2010 10:35 AM, Christopher Johnston wrote:
> Looks good from what I can tell, did you setup the config.ru?
>

Can I take this to mean that you have a working passenger installation
of 2.6.0? Knowing that it can work would at least narrow it down to a
local installation issue rather than a bug in puppet.

Christopher Johnston

unread,
Aug 2, 2010, 2:24:52 PM8/2/10
to Russell Jackson, puppet...@googlegroups.com
I have not played with 2.6.0 yet, but I do have it working fine with .25 just fine. 

Russell Jackson

unread,
Aug 2, 2010, 2:21:35 PM8/2/10
to Christopher Johnston, puppet...@googlegroups.com
On 08/02/2010 11:24 AM, Christopher Johnston wrote:
> I have not played with 2.6.0 yet, but I do have it working fine with .25
> just fine.
>

Same here. Worked in 0.25.5. Stopped working 2.6.0.

Gary Larizza

unread,
Aug 2, 2010, 2:30:18 PM8/2/10
to puppet...@googlegroups.com
I'd question Passenger's 2.2.15 version - I believe 2.2.11 is the last version I've seen work well with Puppet.  It's worth a shot to install 2.2.11 and try again. 

I've got it running on OS X Server 10.6.4 with the following Gems:

*** LOCAL GEMS ***

actionmailer (2.3.8, 2.3.5, 2.2.2, 1.3.6)
actionpack (2.3.8, 2.3.5, 2.2.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.8, 2.3.5, 2.2.2, 1.15.6)
activeresource (2.3.8, 2.3.5, 2.2.2)
activesupport (2.3.8, 2.3.5, 2.2.2, 1.4.4)
acts_as_ferret (0.4.7, 0.4.4, 0.4.3)
capistrano (2.5.19, 2.5.2)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.0, 1.0.10)
dnssd (1.3.1, 0.6.0)
fastthread (1.0.7, 1.0.1)
fcgi (0.8.8, 0.8.7)
ferret (0.11.6)
gem_plugin (0.2.3)
highline (1.5.2, 1.5.0)
hpricot (0.8.2, 0.6.164)
libxml-ruby (1.1.4, 1.1.2)
mongrel (1.1.5)
mysql (2.8.1)
needle (1.3.0)
net-scp (1.0.2, 1.0.1)
net-sftp (2.0.4, 2.0.1, 1.1.1)
net-ssh (2.0.23, 2.0.4, 1.1.4)
net-ssh-gateway (1.0.1, 1.0.0)
passenger (2.2.11, 2.2.9)
rack (1.1.0, 1.0.1)
rails (2.3.8, 2.3.5, 2.2.2, 1.2.6)
rake (0.8.7, 0.8.3)
RedCloth (4.2.3, 4.1.1)
ruby-openid (2.1.7, 2.1.2)
ruby-yadis (0.3.4)
rubygems-update (1.3.7)
rubynode (0.1.5)
sqlite3-ruby (1.3.1, 1.3.0, 1.2.4)
termios (0.9.4)
xmpp4r (0.5, 0.4)


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.



--
Gary Larizza

Director of Technology
Huron City Schools
http://www.huronhs.com


Gary Larizza

unread,
Aug 2, 2010, 2:31:49 PM8/2/10
to puppet...@googlegroups.com
Wait - scratch that, this server's back to .25.5 (reverted it to test out a couple of things).  I'll try getting 2.6 up and running with Passenger and post if it's successful.

I'd still look at 2.2.11.

-Gary

Thorsten Biel

unread,
Aug 2, 2010, 2:46:48 PM8/2/10
to puppet...@googlegroups.com

Hi,

On Mon, Aug 2, 2010 at 7:38 PM, Russell Jackson <r...@csub.edu> wrote:
On 08/02/2010 10:35 AM, Christopher Johnston wrote:
> Looks good from what I can tell, did you setup the config.ru?
>

Can I take this to mean that you have a working passenger installation
of 2.6.0? Knowing that it can work would at least narrow it down to a
local installation issue rather than a bug in puppet.

I have a working installation with 2.6.1 (actually, 2.6.0 and the RCs before
that worked, too). 
This on Ubuntu 10.4 with mod_passenger 2.2.15 installed via gem.
Also, I had to upgrade rack from 1.0.1 to 1.2.1, notably removing all
traces of the old rack version.
With rack 1.0.1 the master actually did work, but would crash with
manifests using the file type with more than one source.

HTH,
-Thorsten

James Turnbull

unread,
Aug 2, 2010, 2:48:46 PM8/2/10
to puppet...@googlegroups.com, Christopher Johnston
Russell Jackson wrote:
> On 08/02/2010 10:35 AM, Christopher Johnston wrote:
>> Looks good from what I can tell, did you setup the config.ru?
>>
>
> Can I take this to mean that you have a working passenger installation
> of 2.6.0? Knowing that it can work would at least narrow it down to a
> local installation issue rather than a bug in puppet.
>

I have a working 2.6.0 passenger config albeit with passenger .11 not
.15 - Jeff McCune I believe tested Puppet with the latest Passenger and
discovered it did not work.

Regards

James

--
Puppet Labs - http://www.puppetlabs.com
C: 503-734-8571

Russell Jackson

unread,
Aug 2, 2010, 2:50:19 PM8/2/10
to puppet...@googlegroups.com, Thorsten Biel

Confirmed.

It just happens that the node I was using to test against had a such a
manifest. Tested against a node that didn't, and I didn't get the error.

Gary Larizza

unread,
Aug 2, 2010, 2:57:12 PM8/2/10
to puppet...@googlegroups.com
If this is true, can someone file a bug report against it?  Passenger's great, but it seems like we're getting to need very specific versions of rack/passenger for certain features.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Gary Larizza

unread,
Aug 2, 2010, 3:00:39 PM8/2/10
to puppet...@googlegroups.com
On second thought (hitting send always triggers those), I'm not sure if this is a puppet bug so much as it's Passenger's problem handling Puppet Manifests.  Maybe we can get something on the wiki about these specific rack/passenger combinations and the problems they solve?

Brice Figureau

unread,
Aug 4, 2010, 1:09:47 PM8/4/10
to puppet...@googlegroups.com

Can anyone experiencing the same issue try the following patch:
http://github.com/masterzen/puppet/commit/4d48437d0102d46cedd865973b97db49bcc862d2

and let us know if that solves or not the issue?
--
Brice Figureau
My Blog: http://www.masterzen.fr/

Eugene Ray

unread,
Aug 4, 2010, 2:56:52 PM8/4/10
to Puppet Users
Looks like it is working for me.

puppet 2.6.1rc1
ruby 1.8.7-299
passenger 2.2.15
rack 1.2.1

Thanks!

On Aug 4, 10:09 am, Brice Figureau <brice-pup...@daysofwonder.com>
wrote:
> On 02/08/10 19:17, Russell Jackson wrote:
>
>
>
>
>
> > I'm having a hell of a time with mod_passenger. Where would I even begin
> > to investigate where this exception is coming from? My configuration
> > works fine with the 2.6.0 webrick server.
>
>
> Can anyone experiencing the same issue try the following patch:http://github.com/masterzen/puppet/commit/4d48437d0102d46cedd865973b9...

Nicolas Brisac

unread,
Aug 5, 2010, 5:31:43 AM8/5/10
to puppet...@googlegroups.com
I've just had a similar issue, although no crash this time.

The recent patches provided by Brice have fixed my issues with file serving in 2.6.0 as long as there's only one source/content.
However, If multiple "contents" are defined it will:

  - Evaluate all templates: The logs on the master show "Interpolated template <template path> in 0.00 seconds" and "Bound template variables for
<template path> in 0.00 seconds" for each template. Shouldn't it happen only for the first one it finds?

  - Set the content of the local file to the last template evaluated.



If the local file is identical to the first template in the array (once filled in), no file is transferred, as expected, proof that the diff actually happens I guess.

Also, I couldn't see any error/warning in the logs.


I can easily replicate:

file { "/tmp/bla": content => [ template("module/blabla.erb"), template("module/hehe.erb") ] }

with blabla.erb --> "bla bla"
and hehe.erb --> "he he"

if /tmp/bla has "bla bla" all is fine, but if it has only "bla" then its content gets replaced by "he he".



With "sources" though, the first one in the array is being used.


Any reason for that?


Nico


Rustler

unread,
Aug 7, 2010, 1:25:08 AM8/7/10
to Puppet Users
Ok - What am I missing... I applied the patch referenced above to the
2.6.1rc1 and did an install over 2.6.0 (which was not working)

Server - RH5 64Bit

puppet 2.6.1rc1
ruby 1.8.5
passenger 2.2.15
rack 1.2.1

[Fri Aug 06 22:03:22 2010] [notice] Apache/2.2.3 (Red Hat) configured
-- resuming
normal operations
*** Exception TypeError in PhusionPassenger::Rack::ApplicationSpawner
(can't conve
rt Array into String) (process 7593):
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:138:in
`unio
n'
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:138
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_ori
ginal_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require
'
from /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_ori
ginal_require'
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require
'


On Aug 5, 2:31 am, Nicolas Brisac <n...@sol1.com.au> wrote:
> I've just had a similar issue, although no crash this time.
>
> The recent patches provided by Brice have fixed my issues with file serving in 2.6.0 as long as there's only one source/content.
> However, If multiple "contents" are defined it will:
>
> - Evaluate all templates: The logs on the master show "Interpolated template <template path> in 0.00 seconds" and "Bound template variables for <template path> in 0.00 seconds" for each template. Shouldn't it happen only for the first one it finds?
>
> - Set the content of the local file to the last template evaluated.
>
> If the local file is identical to the first template in the array (once filled in), no file is transferred, as expected, proof that the diff actually happens I guess .
>
> Also, I couldn't see any error/warning in the logs.
>
> I can easily replicate:
>
> file { "/tmp/bla": content => [ template("module/blabla.erb"), template("module/hehe.erb") ] }
>
> with blabla.erb --> "bla bla"
> and hehe.erb --> "he he"
>
> if /tmp/bla has "bla bla" all is fine, but if it has only "bla" then its content gets replaced by "he he".
>
> With "sources" though, the first one in the array is being used.
>
> Any reason for that?
>
> Nico
>

Rustler

unread,
Aug 8, 2010, 4:19:03 PM8/8/10
to Puppet Users
Found a posting that said go back to rack 1.1.0 which I did - now this
is the error from Apache 2.2.3:

[Sun Aug 08 13:17:33 2010] [error] [client 172.31.255.194]
(104)Connection reset b
y peer: ap_content_length_filter: apr_bucket_read() failed
Reply all
Reply to author
Forward
0 new messages