MacUsers
MacUsers

Reputation: 2229

How to run puppetmaster using Apache/Passenger

Running Puppet v2.7.14 on CEntOs 6 and also using Apache/Passenger instead of WEBrick. I was told that puppetmaster service is not required to be running (hence: chkconfig off puppetmaster) running when using httpd and passenger but in my case, if I don't start puppetmasterd manually, none of the agents can connect to the master. I can start httpd just fine and 'passenger' seems to start okay as well. This is my apache configuration file:

# /etc/httpd/conf.d/passenger.conf 
LoadModule passenger_module modules/mod_passenger.so

<IfModule mod_passenger.c>
    PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.12
    PassengerRuby /usr/bin/ruby
    #PassengerTempDir /var/run/rubygem-passenger

    PassengerHighPerformance on
    PassengerUseGlobalQueue on
    PassengerMaxPoolSize 15
    PassengerPoolIdleTime 150
    PassengerMaxRequests 10000
    PassengerStatThrottleRate 120
    RackAutoDetect Off
    RailsAutoDetect Off
</IfModule>

Upon restart, I see these in the httpd_error log:

[Sat Jun 09 04:06:47 2012] [notice] caught SIGTERM, shutting down
[Sat Jun 09 09:06:51 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sat Jun 09 09:06:51 2012] [notice] Digest: generating secret for digest authentication ...
[Sat Jun 09 09:06:51 2012] [notice] Digest: done
[Sat Jun 09 09:06:51 2012] [notice] Apache/2.2.15 (Unix) DAV/2 Phusion_Passenger/3.0.12 mod_ssl/2.2.15 OpenSSL/1.0.0-fips configured -- resuming normal operations

And passenger-status prints these info on the screen:

----------- General information -----------
max      = 15
count    = 0
active   = 0
inactive = 0
Waiting on global queue: 0

----------- Application groups -----------

But still, as I said, none of my agents can actually talk to the master until I start puppetmasterd manually. Does anyone know what am I still missing? Or, is this the way it supposed too be? Cheers!!

Upvotes: 1

Views: 5514

Answers (2)

MacUsers
MacUsers

Reputation: 2229

After a few days of banging head, now it's running. The main problem was with port number - the puppetmaster was running on different port than puppet agent trying to communicate on.

Another thing is: RackAutoDetect On must be executed before the dashboard vhost file. My So, I renamed passenger vhost file as: 00_passenger.conf to make sure it runs first. After that I get puppetmaster running using Apache/Passenger. Cheers!!

Upvotes: 0

pwan
pwan

Reputation: 2914

It sounds like you may be missing an /etc/httpd/conf.d/puppetmaster.conf file that's based on https://github.com/puppetlabs/puppet/blob/master/ext/rack/files/apache2.conf

Without something like this, you're missing the glue that'll map port 8140 to rack-based pupeptmastd.

See http://docs.puppetlabs.com/guides/passenger.html https://github.com/puppetlabs/puppet/tree/master/ext/rack http://www.modrails.com/documentation/Users%20guide%20Apache.html#_deploying_a_rack_based_ruby_application_including_rails_gt_3

Upvotes: 1

Related Questions