John Warburton
2009-Nov-20 04:27 UTC
[Puppet Users] passenger not accepting alternate config file
Hi All
First up I have puppet (0.25.1), ruby (1.8.7p174), facter (1.5.7) on RHEl
5.1 all in non standard locations - but can get puppetmasterd running with
WEBrick
puppet@linux% echo $RUBYLIB
/apps/puppet/puppet/lib:/apps/puppet/facter/lib
puppet@linux% echo $PATH
/apps/puppet/ruby/bin:/apps/puppet/puppet/bin:/apps/puppet/facter/bin:/usr/lib64/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/ccs/bin:/usr/bin:/usr/sbin:/bin:/sbin
puppet@linux% /apps/puppet/puppet/sbin/puppetmasterd --config
/tmp/puppetmasterd.genconfig --no-daemonize --verbose
notice: Starting Puppet server version 0.25.1
However, trying to move to passenger (2.2.2), it rejects my option of an
alternate config file. I am pretty sure I am missing a path definition, but
for the life of me can''t work it out. (configuration details at end of
post)
root@linux# tail -f /etc/httpd/logs/error_log
[Fri Nov 20 03:54:27 2009] [notice] mod_python: Creating 4 session mutexes
based on 256 max processes and 0 max threads.
[Fri Nov 20 03:54:27 2009] [notice] Apache/2.2.3 (Red Hat) configured --
resuming normal operations
invalid option: --config /tmp/puppetmasterd.genconfig
Try ''puppetmasterd --help''
[ pid=1781 file=ext/common/ApplicationPoolServerExecutable.cpp:307
time=2009-11-20 03:54:46.775 ]:
Client 0x34375e0: SpawnException occured (with error page)
If I remove the --config option from config.ru, puppetmaster complains
(quite rightly /etc/puppet & /var/puppet are missing, because I have set
them somewhere else). If I add other options like
"--vardir=/data/puppet/var
--confdir=/data/puppet/etc", I get the same sort of error
Any pointers in debugging Passenger or Puppet at this level would be
appreciated
Thanks
John
puppet@linux% ls -l /data/puppet/etc/rack/config.ru
-rw-r--r-- 1 puppet _puppet 833 Nov 20 04:15 /data/puppet/etc/rack/config.ru
config.ru:
$:.unshift(''/apps/puppet/puppet/lib'')
$:.unshift(''/apps/puppet/facter/lib'')
$0 = "puppetmasterd"
require ''puppet''
ARGV << "--debug"
ARGV << "--verbose"
ARGV << "--rack"
ARGV << "--config /tmp/puppetmasterd.genconfig"
require ''puppet/application/puppetmasterd''
run Puppet::Application[:puppetmasterd].run
(I''ve also tried commenting out the "require puppet")
puppet@linux% lynx https://puppet-esx-rmc.domain.com:8140/
Application root:
/data/puppet/etc/rack
Backtrace:
# File Line Location
0 /apps/puppet/puppet/lib/puppet/application.rb 266 in `exit''
1 /apps/puppet/puppet/lib/puppet/application.rb 266 in
`parse_options''
2 /apps/puppet/puppet/lib/puppet/application.rb 214 in `run''
3 /apps/puppet/puppet/lib/puppet/application.rb 306 in
`exit_on_fail''
4 /apps/puppet/puppet/lib/puppet/application.rb 214 in `run''
5 config.ru 23
6
/apps/puppet/ruby-1.8.7-p174-x86_64/lib/ruby/gems/1.8/gems/passenger-2.2.2/vendor/rack-1.0.0-git/lib/rack/builder.rb
29 in `instance_eval''
7
/apps/puppet/ruby-1.8.7-p174-x86_64/lib/ruby/gems/1.8/gems/passenger-2.2.2/vendor/rack-1.0.0-git/lib/rack/builder.rb
29 in `initialize''
8 config.ru 1 in `new''
9 config.ru 1
puppet@linux% gem list
*** LOCAL GEMS ***
fastthread (1.0.7)
passenger (2.2.2)
rack (1.0.1)
rake (0.8.7)
root@linux# cat /etc/httpd/conf.d/puppetmasterd.conf
# you probably want to tune these settings
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RackAutoDetect Off
RailsAutoDetect Off
PassengerLogLevel 3
Listen 8140
<VirtualHost *:8140>
ServerName puppet-esx-rmc.domain.com
LoadModule passenger_module
/apps/puppet/ruby-1.8.7-p174-x86_64/lib/ruby/gems/1.8/gems/passenger-2.2.2/ext/apache2/mod_passenger.so
PassengerRoot
/apps/puppet/ruby-1.8.7-p174-x86_64/lib/ruby/gems/1.8/gems/passenger-2.2.2
PassengerRuby /apps/puppet/ruby-1.8.7-p174-x86_64/bin/ruby
SSLEngine on
SSLProtocol -ALL +SSLv3 +TLSv1
SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:-LOW:-SSLv2:-EXP
SSLCertificateFile
/data/puppet/etc/ssl/certs/puppet-esx-rmc.domain.com.pem
SSLCertificateKeyFile
/data/puppet/etc/ssl/private_keys/puppet-esx-rmc.domain.com.pem
SSLCertificateChainFile /data/puppet/etc/ssl/ca/ca_crt.pem
SSLCACertificateFile /data/puppet/etc/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 /data/puppet/etc/ssl/ca/ca_crl.pem
SSLVerifyClient optional
SSLVerifyDepth 1
SSLOptions +StdEnvVars
DocumentRoot /data/puppet/etc/rack/public/
RackBaseURI /
<Directory /data/puppet/etc/rack/>
Options None
AllowOverride None
Order allow,deny
allow from all
</Directory>
</VirtualHost>
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=.
Christian Hofstaedtler
2009-Nov-20 11:40 UTC
[Puppet Users] Re: passenger not accepting alternate config file
> config.ru: > $:.unshift(''/apps/puppet/puppet/lib'') > $:.unshift(''/apps/puppet/facter/lib'') > $0 = "puppetmasterd" > require ''puppet'' > ARGV << "--debug" > ARGV << "--verbose" > ARGV << "--rack" > ARGV << "--config /tmp/puppetmasterd.genconfig"Did you try with this? -> ARGV << "--config" ARGS << "/tmp/puppetmasterd.genconfig" Christian -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=.
Nigel Kersten
2009-Nov-20 16:09 UTC
Re: [Puppet Users] Re: passenger not accepting alternate config file
On Fri, Nov 20, 2009 at 5:40 AM, Christian Hofstaedtler <ch+git@zeha.at> wrote:> >> config.ru: >> $:.unshift(''/apps/puppet/puppet/lib'') >> $:.unshift(''/apps/puppet/facter/lib'') >> $0 = "puppetmasterd" >> require ''puppet'' >> ARGV << "--debug" >> ARGV << "--verbose" >> ARGV << "--rack" >> ARGV << "--config /tmp/puppetmasterd.genconfig" > > Did you try with this? -> > ARGV << "--config" > ARGS << "/tmp/puppetmasterd.genconfig"I can confirm that I''m doing this and it Works For Me.> > > Christian > > -- > > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=. > > >-- nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=.
John Warburton
2009-Nov-21 08:35 UTC
Re: [Puppet Users] Re: passenger not accepting alternate config file
Thanks Guys
But it didn''t seem to like ARGS. Is it set in rack or passenger or ??
Can I amp up the debugging here?
Cheers
John
config.ru:
$:.unshift(''/apps/puppet/puppet/lib'')
$:.unshift(''/apps/puppet/facter/lib'')
$0 = "puppetmasterd"
require ''puppet''
ARGV << "--debug"
ARGV << "--verbose"
ARGV << "--rack"
ARGV << "--config"
ARGS << "/tmp/puppetmasterd.genconfig"
require ''puppet/application/puppetmasterd''
run Puppet::Application[:puppetmasterd].run
puppet@linux% lynx https://puppet-esx-rmc.domain.com:8140/
Error message:
uninitialized constant ARGS
Exception class:
NameError
Application root:
/data/puppet/etc/rack
Backtrace:
# File Line Location
0 config.ru 19
1
/apps/puppet/ruby-1.8.7-p174-x86_64/lib/ruby/gems/1.8/gems/passenger-2.2.2/vendor/rack-1.0.0-git/lib/rack/builder.rb
29 in
`instance_eval''
2
/apps/puppet/ruby-1.8.7-p174-x86_64/lib/ruby/gems/1.8/gems/passenger-2.2.2/vendor/rack-1.0.0-git/lib/rack/builder.rb
29 in
`initialize''
3 config.ru 1 in `new''
4 config.ru 1
2009/11/21 Nigel Kersten <nigelk@google.com>
> On Fri, Nov 20, 2009 at 5:40 AM, Christian Hofstaedtler
<ch+git@zeha.at<ch%2Bgit@zeha.at>>
> wrote:
> >
> >> config.ru:
> >> $:.unshift(''/apps/puppet/puppet/lib'')
> >> $:.unshift(''/apps/puppet/facter/lib'')
> >> $0 = "puppetmasterd"
> >> require ''puppet''
> >> ARGV << "--debug"
> >> ARGV << "--verbose"
> >> ARGV << "--rack"
> >> ARGV << "--config /tmp/puppetmasterd.genconfig"
> >
> > Did you try with this? ->
> > ARGV << "--config"
> > ARGS << "/tmp/puppetmasterd.genconfig"
>
> I can confirm that I''m doing this and it Works For Me.
>
>
> >
> >
> > Christian
> >
> > --
> >
> > You received this message because you are subscribed to the Google
Groups
> "Puppet Users" group.
> > To post to this group, send email to puppet-users@googlegroups.com.
> > To unsubscribe from this group, send email to
>
puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com>
> .
> > For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=.
> >
> >
> >
>
>
>
> --
> nigel
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
>
puppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=.
>
>
>
--
John Warburton
Ph: 0417 299 600
Email: jwarburton@gmail.com
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=.
Scott Smith
2009-Nov-21 21:10 UTC
Re: [Puppet Users] Re: passenger not accepting alternate config file
John Warburton wrote:> Thanks Guys > > But it didn''t seem to like ARGS. Is it set in rack or passenger or ?? > > Can I amp up the debugging here? >Have you tried this? ARGV << "--config=/tmp/puppetmasterd.genconfig" -scott -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=.
John Warburton
2009-Nov-23 00:04 UTC
Re: [Puppet Users] Re: passenger not accepting alternate config file
2009/11/22 Scott Smith <scott@ohlol.net>> John Warburton wrote: > > Thanks Guys > > > > But it didn''t seem to like ARGS. Is it set in rack or passenger or ?? > > > > Can I amp up the debugging here? > > > > Have you tried this? > > ARGV << "--config=/tmp/puppetmasterd.genconfig" > > -scott > >Ah, now that works! Thanks Scott On to debugging file metadata issues: Failed to retrieve current state of resource: undefined method `name='' for #<Puppet::FileServing::Metadata:0xb6f2bf28> Could not retrieve file metadata for puppet:///modules/security/var/tmp/krb5-workstation-1.2.7-70.i386.rpm Thanks all that took a look Regards John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=.
Nigel Kersten
2009-Nov-23 18:59 UTC
Re: [Puppet Users] Re: passenger not accepting alternate config file
On Sun, Nov 22, 2009 at 4:04 PM, John Warburton <jwarburton@gmail.com> wrote:> 2009/11/22 Scott Smith <scott@ohlol.net> >> >> John Warburton wrote: >> > Thanks Guys >> > >> > But it didn''t seem to like ARGS. Is it set in rack or passenger or ?? >> > >> > Can I amp up the debugging here? >> > >> >> Have you tried this? >> >> ARGV << "--config=/tmp/puppetmasterd.genconfig" >> >> -scott >> > > Ah, now that works! Thanks ScottSorry for misreading the email earlier, what I''m actually doing is: ARGV << "--config" << "/etc/puppet/puppetmasterd.conf" I was under the impression we weren''t meant to use "=" in puppet config settings, but I could be wrong.> > On to debugging file metadata issues: > Failed to retrieve current state of resource: undefined method `name='' for > #<Puppet::FileServing::Metadata:0xb6f2bf28> Could not retrieve file metadata > for puppet:///modules/security/var/tmp/krb5-workstation-1.2.7-70.i386.rpm > > Thanks all that took a look > > Regards > > John > > -- > > You received this message because you are subscribed to the Google Groups > "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=. >-- nigel -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=.
Scott Smith
2009-Nov-24 00:18 UTC
Re: [Puppet Users] Re: passenger not accepting alternate config file
Nigel Kersten wrote:> I was under the impression we weren''t meant to use "=" in puppet > config settings, but I could be wrong. >Eh, it just uses optparse to read command-line flags, which accepts the use of an equals sign. -scott -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=.
John Warburton
2009-Nov-24 02:02 UTC
Re: [Puppet Users] Re: passenger not accepting alternate config file
Thanks Nigel 2009/11/24 Nigel Kersten <nigelk@google.com>> > Sorry for misreading the email earlier, what I''m actually doing is: > > ARGV << "--config" << "/etc/puppet/puppetmasterd.conf" > >This now works Part of the problem debugging this was: 1) My lack of knowledge of ruby 2) I had kept caches, files etc on client & server from when running Webrick which confused things no end 3) My naive expectation connecting to passenger via a web browser would produce something useful Cheers John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.