Ask Your Question
0

puppetmaster down with error after ruby update

asked 2015-05-16 10:24:19 -0500

pup-master gravatar image

updated 2015-05-18 09:45:06 -0500

:backends:
  - yaml
:yaml:
  :datadir: /etc/puppet/hieradata
:hierarchy:
  - "node/%{::fqdn}"
  - "%{clientcert}
  - common

I had a puppet master running but I upgraded ruby to install the latest librarian-puppet. That broke the setup and I started installing puppet master from step 1.

However, when httpd restarts the puppet master website at port 8140 is failing with "We're sorry, but something went wrong." error message.

Below are some errors, etc. Anyone have a suggestion out of this? Thanks.

/var/log/httpd/error_log

[ 2015-05-16 07:53:38.2851 7610/7fc60e096700 App/Implementation.cpp:287 ]: Could not spawn process for application /usr/share/puppet/rack/puppetmasterd: An error occured while starting up the preloader. Error ID: 79f3a9ec
Error details saved to: /tmp/passenger-error-dKtLOR.html
Message from application: exit (SystemExit)
/usr/lib/ruby/siteruby/1.8/puppet/util.rb:502:in exit' /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:502:in exitonfail'
/usr/lib/ruby/site
ruby/1.8/puppet/application.rb:378:in run' /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:146:inrun'
/usr/lib/ruby/siteruby/1.8/puppet/util/commandline.rb:92:in execute' config.ru:35 /usr/lib/ruby/gems/1.8/gems/rack-1.6.1/lib/rack/builder.rb:55:in instance_eval'
/usr/lib/ruby/gems/1.8/gems/rack-1.6.1/lib/rack/builder.rb:55:in initialize' config.ru:1:innew'
config.ru:1

[ 2015-05-16 07:53:38.3186 7610/7fc60f0d9700 age/Hel/Req/CheckoutSession.cpp:252 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is 79f3a9ec. Please see earlier logs for details about the error.

versions

$ bundle -v
Bundler version 1.9.8 $
$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]

/etc/httpd/conf.d/puppetmaster.conf

LoadModule passenger_module
/usr/lib/ruby/gems/1.8/gems/passenger-5.0.7/buildout/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-5.0.7
PassengerDefaultRuby /usr/bin/ruby

PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
PassengerMaxRequests 1000
PassengerStatThrottleRate 120

Listen 8140
<VirtualHost *:8140>
SSLEngine on
SSLProtocol             ALL -SSLv2 -SSLv3
SSLCipherSuite EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA384:EECDH+aRSA+SHA256:EECDH:+CAMELLIA256:+AES256:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA256-SHA:AES256-SHA:CAMELLIA128-SHA:AES128-SHA
SSLHonorCipherOrder     on
SSLCertificateFile      /var/lib/puppet/ssl/certs/puppetmaster.oracle.pem
SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/puppetmaster.oracle.pem

after some experiment, turns out having hiera.yaml in the /etc/puppet is causing the issue.

After getting rid of hiera.yaml and the hiera_config in puppet.conf, the error is gone and puppet master is back.

Is using hiera known to cause this kind of issue?

edit retag flag offensive close merge delete

Comments

How did you upgrade Ruby? While it's possible to run Puppet 3.7.x on Ruby 2.1.x the packages rely on and expect the distro packaged version of Ruby which is usually 1.8.7.

ramindk gravatar imageramindk ( 2015-05-16 13:07:52 -0500 )edit

sudo yum remove ruby ; yum groupinstall "Development Tools" ; sudo yum groupinstall "Development Tools" ; sudo yum install zlib zlib-devel ; sudo yum install openssl-devel ; wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz ; tar xvfvz ruby-2.1.2.tar.gz ; cd ruby-2.1.2 ; ./configure

pup-master gravatar imagepup-master ( 2015-05-16 13:25:35 -0500 )edit

then make and make install. any clue?

pup-master gravatar imagepup-master ( 2015-05-16 13:33:19 -0500 )edit

situation changed. please see my updates post.

pup-master gravatar imagepup-master ( 2015-05-16 14:25:53 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-16 23:22:34 -0500

ramindk gravatar image

Ruby 1.8.7 has a different yaml parser than Ruby 1.9.3+. Try quoting in your hiera.yaml file. Chance are you have something like

fqdn/%{clientcert}

Try quoting it like this

"fqdn/%{clientcert}"
edit flag offensive delete link more

Comments

How would you do that on ":backends: - yaml :yaml: :datadir: /etc/puppet/hieradata :hierarchy: - "node/%{::fqdn}" - "%{clientcert} - common"

pup-master gravatar imagepup-master ( 2015-05-17 10:36:21 -0500 )edit

shouldn't need to quote a line unless it has a variable in it like %{fqdn}

ramindk gravatar imageramindk ( 2015-05-17 17:28:48 -0500 )edit

so out of what I pasted, what should you put in quotes? I'm very dumb, please guide, haha

pup-master gravatar imagepup-master ( 2015-05-17 17:45:01 -0500 )edit

add it properly formatting to the question. Can't really tell with the way it appears in your comment.

ramindk gravatar imageramindk ( 2015-05-18 01:12:00 -0500 )edit

added in at the beginning of the question. Thanks.

pup-master gravatar imagepup-master ( 2015-05-18 09:23:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-05-16 10:24:19 -0500

Seen: 1,282 times

Last updated: May 18 '15