I met the same problem with you.Thank you for solving this problem.I'm  in 
this trouble from several days.
 

在 2012年7月26日星期四UTC+8上午2时56分32秒,banjer写道:

> I solved it.  My puppetmaster and puppet-dashboard apache configs were 
> conflicting.  Looks like it was related to RackBaseURI and RailsBaseURI.  
>
>
> Under VirtualHost definition in /etc/httpd/conf.d/puppetmaster.conf I 
> added:
>
> RackBaseURI /
>
> Under VirtualHost definition in /etc/httpd/conf.d/dashboard-vhost.conf I 
> added:
>
> RailsBaseURI /
>
> On Wednesday, July 25, 2012 8:10:55 AM UTC-4, banjer wrote: 
>>
>> Hi,
>> I am trying to configure my puppet master to be served by 
>> Apache/Passenger.  I was successful in getting puppet-dashboard to run 
>> under Apache/Passenger, but have been running into issues with puppet 
>> master.  
>>
>> When I visit https://foo:8140 in my browser to test things out, I get:
>>
>> Ruby on Rails application could not be started
>>    Error message:
>>   No such file or directory - config/environment.rb   Exception class:   
>> Errno::ENOENT   Application root:    /etc/puppet/rack ------
>>
>> I'm running Apache 2.2.15 on CentOS 6.3, passenger is version 3.0.14, and 
>> rails is version 2.13.12.
>>
>> root@foo~> gem list
>>
>> *** LOCAL GEMS ***
>>
>> actionmailer (2.3.12)
>> actionpack (2.3.12)
>> activerecord (2.3.12)
>> activeresource (2.3.12)
>> activesupport (2.3.12)
>> daemon_controller (1.0.0)
>> fastthread (1.0.7)
>> passenger (3.0.14)
>> rack (1.4.1, 1.1.0)
>> rails (2.3.12)
>> rake (0.9.2.2, 0.8.7)
>>
>>
>> Here are my Apache configs:
>>
>> In* /etc/httpd/conf/httpd.conf*:
>>
>>
>> LoadModule passenger_module 
>> /usr/lib/ruby/gems/1.8/gems/passenger-3.0.14/ext/apache2/mod_passenger.so
>> PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.14
>> PassengerRuby /usr/bin/ruby
>>
>>
>> In* /etc/httpd/conf.d/puppetmaster.conf*:
>>
>>
>> # you probably want to tune these settings
>> PassengerHighPerformance on
>> PassengerMaxPoolSize 12
>> PassengerPoolIdleTime 1500
>> # PassengerMaxRequests 1000
>> PassengerStatThrottleRate 120
>> RackAutoDetect Off
>> RailsAutoDetect Off
>>
>> Listen 8140
>> <VirtualHost *:8140>
>>         SSLEngine on
>>         SSLProtocol -ALL +SSLv3 +TLSv1
>>         SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
>>
>>         SSLCertificateFile      
>> /var/lib/puppet/ssl/certs/foo.mydomain.com.pem
>>         SSLCertificateKeyFile   
>> /var/lib/puppet/ssl/private_keys/foo.mydomain.com.pem
>>         SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem
>>         SSLCACertificateFile    /var/lib/puppet/ssl/ca/ca_crt.pem
>>         # If Apache complains about invalid signatures on the CRL, you 
>> can try disabling
>>         # CRL checking by commenting the next line, but this is not 
>> recommended.
>>         SSLCARevocationFile     /var/lib/puppet/ssl/ca/ca_crl.pem
>>         SSLVerifyClient optional
>>         SSLVerifyDepth  1
>>         SSLOptions +StdEnvVars
>>
>>         # This header needs to be set if using a loadbalancer or proxy
>>         RequestHeader unset X-Forwarded-For
>>
>>         RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e
>>         RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e
>>         RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e
>>
>>         DocumentRoot /etc/puppet/rack/public/
>>         RackBaseURI /
>>         <Directory /etc/puppet/rack/public/>
>>                 Options None
>>                 AllowOverride None
>>                 Order allow,deny
>>                 allow from all
>>         </Directory>
>> </VirtualHost>
>>
>>
>> *root@foo:/etc/puppet/rack> ls -la*
>> total 24
>> drwxr-xr-x  5 root   root   4096 Jul 25 07:51 ./
>> drwxr-xr-x. 7 root   root   4096 Jul 24 15:58 ../
>> -rw-r--r--  1 puppet puppet  550 Jul 25 07:51 config.ru
>> drwxr-xr-x  3 root   root   4096 Jul 24 11:18 public/
>> drwxr-xr-x  6 root   root   4096 Jul 24 15:34 .svn/
>> drwxr-xr-x  3 root   root   4096 Jul 24 11:18 tmp/
>>
>>
>> *root@foo:/etc/puppet/rack> more config.ru*
>> # a config.ru, for use with every rack-compatible webserver.
>> # SSL needs to be handled outside this, though.
>>
>> # if puppet is not in your RUBYLIB:
>> # $:.unshift('/opt/puppet/lib')
>> $:.unshift('/usr/share/puppet/lib')
>> $:.unshift('/var/lib/puppet/lib')
>> $:.unshift('/usr/lib/ruby/site_ruby/1.8/puppet')
>>
>> $0 = "master"
>>
>> # if you want debugging:
>> # ARGV << "--debug"
>>
>> ARGV << "--rack"
>> require 'puppet/application/master'
>> # we're usually running inside a Rack::Builder.new {} block,
>> # therefore we need to call run *here*.
>> run Puppet::Application[:master].run
>>
>> --------
>> The Apache error_log says the same thing: no such file or directory 
>> config/environment.rb.   I see this config/environment.rb for 
>> puppet-dashboard, but the puppet 
>> docs<http://projects.puppetlabs.com/projects/1/wiki/Using_Passenger>make no 
>> mention of it.  I'm not familiar with Ruby/Rails/Passenger, so any 
>> help would be appreciated.  Also, I should note that when running with the 
>> puppetmaster service, my puppet agent is able to connect just fine with 
>> puppet agent --test.
>>
>> Thanks!
>>
>>
>>
>>

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


Reply via email to