I''m attempting to deploy puppet via an NFS share. It''s on a local-only network, and it will contain only ruby (gems) and whatever is needed. Seems simple enough, but tonight I am having an issue with this error: # service puppet start Starting puppet: /local/lib/ruby/site_ruby/1.8/rubygems/ custom_require.rb:36:in `gem_original_require'': no such file to load -- openssl (LoadError) from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ssl.rb:3 from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'' from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet.rb:155 from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'' from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ application.rb:271:in `initialize'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ application.rb:229:in `new'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ application.rb:229:in `[]'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/bin/puppetd:4 from /local/bin/puppetd:19:in `load'' from /local/bin/puppetd:19 I did a search for this general error and it seems to come up with different circumstances. I checked the $PATH in the startup script, I can run ruby/irb alone with no trouble. All of my other systems do not have any supplemental GEMs that deal with SSL. There''s nothing else on this system, no other ruby. Seems like it might be a simple thing - but I wonder what the problem is? I''ve been poring over this for a while... I can''t see it. Thanks. -- 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.
On Feb 22, 6:50 pm, Forrie <for...@gmail.com> wrote:> I''m attempting to deploy puppet via an NFS share. It''s on a local-only > network, and it will contain only ruby (gems) and whatever is needed. > > Seems simple enough, but tonight I am having an issue with this error: > > # service puppet start > Starting puppet: /local/lib/ruby/site_ruby/1.8/rubygems/ > custom_require.rb:36:in `gem_original_require'': no such file to load > -- openssl (LoadError) > from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `require'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ssl.rb:3 > from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `gem_original_require'' > from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `require'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet.rb:155 > from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `gem_original_require'' > from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in > `require'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ > application.rb:271:in `initialize'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ > application.rb:229:in `new'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/lib/puppet/ > application.rb:229:in `[]'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.9/bin/puppetd:4 > from /local/bin/puppetd:19:in `load'' > from /local/bin/puppetd:19 > > I did a search for this general error and it seems to come up with > different circumstances. > > I checked the $PATH in the startup script, I can run ruby/irb alone > with no trouble. All of my other systems do not have any > supplemental GEMs that deal with SSL. There''s nothing else on this > system, no other ruby. > > Seems like it might be a simple thing - but I wonder what the problem > is? I''ve been poring over this for a while... I can''t see it.This is probably not an issue with the executable search path, but rather with the Ruby path. It looks like whichever Ruby interpreter you are using to run Puppet is unable to find one of the files (probably openssl.rb) that it expects to see in the Ruby library. The Ruby interpreter in use will probably be controlled by the puppet[d] script, not directly by the initscript that launches it, and the interpreter will have its own ideas of where its library is supposed to be. If I were pursuing your approach, I would put a complete Ruby installation on the share, and install Puppet and all the needed dependencies into that. Then I would be sure to launch Puppet using *that* Ruby, not, for instance, the system''s Ruby. It''s not clear to me whether that''s what you''re already trying to do, but if so, then I don''t think you''ve gotten it completely right. 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.
> This is probably not an issue with the executable search path, but > rather with the Ruby path. It looks like whichever Ruby interpreter > you are using to run Puppet is unable to find one of the files > (probably openssl.rb) that it expects to see in the Ruby library. The > Ruby interpreter in use will probably be controlled by the puppet[d] > script, not directly by the initscript that launches it, and the > interpreter will have its own ideas of where its library is supposed > to be. > > If I were pursuing your approach, I would put a complete Ruby > installation on the share, and install Puppet and all the needed > dependencies into that. Then I would be sure to launch Puppet using > *that* Ruby, not, for instance, the system''s Ruby. It''s not clear to > me whether that''s what you''re already trying to do, but if so, then I > don''t think you''ve gotten it completely right. > > JohnThis is what I did, I did a make/make install into the shared location. But I wonder if there is some hard-coded PATH in there somewhere. I''ll have to poke around. I don''t see where I can do a trace on executing this to see what it''s calling. Thanks! -- 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.
This must have to do with an include path, as here is where I find the code: /local/lib/ruby/site_ruby/1.8/rubygems/gem_openssl.rb it''s been a while, but I think the SITE_RUBY include is configured somewhere - and that may be the issue. -- 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.
I just did a basic find statement and found: # pwd /local/lib/ruby/gems/1.8/gems/puppet-2.7.11 # find . -exec grep -i site_ruby {} \; SITELIBDIR="/usr/lib/ruby/site_ruby/1.8" sitelibdir = $LOAD_PATH.find { |x| x =~ /site_ruby/ } sitelibdir = File.join(libdir, "site_ruby") "#{work}/usr/lib/ruby/site_ruby/1.8/puppet"] system("#{DITTO} #{puppet_source}/lib/ #{work}/usr/lib/ruby/ site_ruby/1.8/") system("#{SED} -i '''' \"s\#{SITELIBDIR}\#/usr/lib/ruby/site_ruby/ 1.8\#g\" #{@working_tree[''scripts'']}/preflight") FileUtils.chmod_R(0644, "#{work}/usr/lib/ruby/site_ruby/1.8/") FileUtils.chown_R(''root'', ''wheel'', "#{work}/usr/lib/ruby/site_ruby/ 1.8/") Find.find("#{work}/usr/lib/ruby/site_ruby/1.8/") do |dir| # into RUBY''s site_ruby directory. If you run into strange problems, make sure Puppet should not be installed in site_ruby because all of \$LOAD_PATH Somewhere, puppet is not inheriting the correct PATH to site_ruby. -- 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.
On Feb 23, 1:53 pm, Forrie <for...@gmail.com> wrote:> This is what I did, I did a make/make install into the shared > location. But I wonder if there is some hard-coded PATH in there > somewhere. I''ll have to poke around. I don''t see where I can do a > trace on executing this to see what it''s calling.Did you configure the build for the shared location, and ''make install'' directly into it (i.e. without using a $DESTDIR equivalent)? Have you checked the Ruby build/configure options to see whether you need to configure the site_lib directory separately from the install directory? Is it possible that you used the system''s Ruby (or the system''s gem) to install the openssl or puppet gem into the shared location? You should be sure to use only the Ruby toolset on the share to manipulate the Ruby install there. If you installed Puppet from sources instead of via gem then you should check build/install configuration as above, and also be sure that *that* build also used the target Ruby toolset instead of the system''s. Although it''s possible that one or more of the pieces of software in this stack (or one of their build systems) is inherently broken, I am inclined to suspect that configure / build options and process instead. 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.
On Feb 23, 2:10 pm, Forrie <for...@gmail.com> wrote:> I just did a basic find statement and found: > > # pwd > /local/lib/ruby/gems/1.8/gems/puppet-2.7.11 > > # find . -exec grep -i site_ruby {} \; > > SITELIBDIR="/usr/lib/ruby/site_ruby/1.8" > sitelibdir = $LOAD_PATH.find { |x| x =~ /site_ruby/ } > sitelibdir = File.join(libdir, "site_ruby") > "#{work}/usr/lib/ruby/site_ruby/1.8/puppet"] > system("#{DITTO} #{puppet_source}/lib/ #{work}/usr/lib/ruby/ > site_ruby/1.8/") > system("#{SED} -i '''' \"s\#{SITELIBDIR}\#/usr/lib/ruby/site_ruby/ > 1.8\#g\" #{@working_tree[''scripts'']}/preflight") > FileUtils.chmod_R(0644, "#{work}/usr/lib/ruby/site_ruby/1.8/") > FileUtils.chown_R(''root'', ''wheel'', "#{work}/usr/lib/ruby/site_ruby/ > 1.8/") > Find.find("#{work}/usr/lib/ruby/site_ruby/1.8/") do |dir| > # into RUBY''s site_ruby directory. If you run into strange problems, > make sure > Puppet should not be installed in site_ruby because all of \$LOAD_PATH > > Somewhere, puppet is not inheriting the correct PATH to site_ruby.All the appearances of literal ''/usr/lib/ruby/site_ruby/1.8/'' really make me suspect that Puppet was not configured correctly for the target Ruby toolset. That might easily happen if it was configured / built / installed using the system''s Ruby toolset instead of the target Ruby''s. It might also happen if the target Ruby were misconfigured, though that seems less likely to me. 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.
I built Ruby with: ./configure --prefix=/local I see that you can specify a number of options with ./configure, including: --with-sitedir=DIR site libraries in DIR [LIBDIR/ruby/site_ruby] but the defaults for this should just work with that switch. I see these options, too: --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --libdir=DIR object code libraries [EPREFIX/lib] I''ve never had to specify anything other than the above ./configure switch before. All of my other systems work fine. It''s just this bit with the NFS mount. The client system in question does not have any other ruby or puppet installations on it. Thanks. -- 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.
Also, the puppet I''m using (on all systems) is installed from the gem. -- 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.
On Feb 24, 1:38 pm, Forrie <for...@gmail.com> wrote:> Also, the puppet I''m using (on all systems) is installed from the gem.You did not directly answer the key question, which I now think is this:>Is it possible that you used the system''s Ruby (or the system''s gem) >to install the openssl or puppet gem into the shared location? You >should be sure to use only the Ruby toolset on the share to manipulate >the Ruby install there.It sounds like you used the system''s gem binary to perform the installation, which (to the best of my knowledge) is normally configured for the system''s Ruby. I suppose you installed Puppet with a command such as gem install --install-dir /local/lib/ruby/gems/1.8/gems/ The trick is, that''s probably wrong. It will drop the Puppet gem''s files into the specified directory, but gem (and the Ruby underneath it) still know that the standard lib directory for that ruby is /usr/ lib/ruby. You may be able to rescue the situation by ensuring that appropriate values of $RUBYLIB and $GEM_HOME are set in the agent''s environment. Better, however, would be to build (if necessary), install, and configure a ''gem'' binary on your share. Ensure that it is set to run using the ruby from the share (something like /local/bin/ruby) instead of the system ruby. Then use (only) *that* gem binary to manage the gems installed on the share. The big picture is this: you should bootstrap the whole Ruby stack from scratch, being certain not to configuration, tools, or files from one stack with those from a different one. If I were doing this, I might perform the build in a VM that had no other ruby in the first place, to be certain that I didn''t accidentally mix things. 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.
I installed this using the full path to the shared gem, simply: /local/bin/gem install puppet The puppet code, et al, is in the proper place under /local/lib/.... I don''t need to worry about the installation, I can overwrite it any time -- this is my test platform. I did bootstrap ruby and installed it in /local via "./configure -- prefix=/local" and it installed fine, too. -- 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.
Here are the errors in full, and demonstrating the entire path: [ /local]# bin/gem list *** LOCAL GEMS *** facter (1.6.5) puppet (2.7.11) [ /local]# bin/puppet --version /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'': no such file to load -- openssl (LoadError) from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/ssl.rb:3 from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'' from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet.rb:155 from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'' from /local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/ application.rb:272:in `initialize'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/ command_line.rb:60:in `new'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/ command_line.rb:60:in `execute'' from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/bin/puppet:4 from bin/puppet:19:in `load'' from bin/puppet:19 [ /local]# bin/ruby --version ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux] -- 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.
>Here are the errors in full, and demonstrating the entire path: > > >[ /local]# bin/gem list > >*** LOCAL GEMS *** > >facter (1.6.5) >puppet (2.7.11) > > >[ /local]# bin/puppet --version > >/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in >`gem_original_require'': no such file to load -- openssl (LoadError) > fromDid you build this on a system with openssl-devel or equivalent installed? Or install openssl+devel headers into your /local location?>/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in >`require'' > from >/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/ssl.rb:3 > from >/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in >`gem_original_require'' > from >/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in >`require'' > from >/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet.rb:155 > from >/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in >`gem_original_require'' > from >/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in >`require'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/ >application.rb:272:in `initialize'' > from >/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/ >command_line.rb:60:in `new'' > from >/local/lib/ruby/gems/1.8/gems/puppet-2.7.11/lib/puppet/util/ >command_line.rb:60:in `execute'' > from /local/lib/ruby/gems/1.8/gems/puppet-2.7.11/bin/puppet:4 > from bin/puppet:19:in `load'' > from bin/puppet:19 > > >[ /local]# bin/ruby --version >ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux] > >-- >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. > >This email communication and any files transmitted with it may contain confidential and or proprietary information and is provided for the use of the intended recipient only. Any review, retransmission or dissemination of this information by anyone other than the intended recipient is prohibited. If you receive this email in error, please contact the sender and delete this communication and any copies immediately. Thank you. http://www.encana.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=en.
> > Did you build this on a system with openssl-devel or equivalent installed? Or install openssl+devel headers into your /local location?BINGO! That was the problem. THANK YOU. What really gets me is that I would never have figured this out, based on the ambiguous error message. I just recompiled, reinstalled and now puppet works. I''m going to now test deploying this via NFS -- separate 32bit and 64bit mounts. Has anyone done this before. I realize the next step will be storedconfigs so that a minimal amount of data is needed on each host. I just haven''t found any information out there about anyone having done this via NFS. Thanks. -- 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.