FAQ
I'm using Fedora 18 KDE in VirtualBox, fresh install this morning with full
updates using yum.

I installed puppet by adding the puppet labs yum repo and then "sudo yum
install puppet", so now I'm running puppet version 3.1.1

Running "puppet --version" or "sudo puppet agent --test" gave me the
following error:

*/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': cannot
load such file -- puppet/util/command_line (LoadError)*
* from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require'*
* from /usr/bin/puppet:3:in `<main>'*

As far as I can tell with my limited knowledge of Ruby, Linux and Puppet,
/usr/bin/puppet has a line "require 'puppet/util/command_line'" which
executes via /usr/bin/ruby. The custom_require.rb script (part of ruby)
then looks for a file puppet/util/command_line relative to itself which it
can't find.

Looking at an AWS Linux box where puppet is working, I can see that the
custom_require.rb file is located at
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb, whereas on my
Fedora box the file is located at
/usr/share/rubygems/rubygems/custom_require.rb, the problem is that puppet
has installed it's ruby files in /usr/lib/ruby/site_ruby/1.8, but they
should actually be in /usr/share/rubygems.

The first fix was to add "RUBYLIB=/usr/lib/ruby/site_ruby/1.8" in
/etc/environment and "export RUBYLIB=/usr/lib/ruby/site_ruby/1.8" at the
beginning of /etc/rc.d/init.d/puppet but that felt pretty dirty so now I've
done this:

*sudo mv /usr/lib/ruby/site_ruby/1.8/* /usr/share/rubygems/
*
*sudo rm -r /usr/lib/ruby/site_ruby/1.8
*
*sudo ln -s /usr/share/rubygems /usr/lib/ruby/site_ruby/1.8*

If anyone has a better solution I'm all ears, ideally I'd like to just use
yum for puppet and any of it's dependencies, tweak the puppet.conf file and
everything work (like it does in EC2, etc), Do I have to install another
version of ruby?? Or set an environment variable before installing puppet
so it knows where to put the files?? Maybe it's just Fedora's weird ruby
install process?

Here's a yum list just in case:

$ sudo yum list installed | grep ruby
libselinux-ruby.x86_64 2.1.12-7.3.fc18 @updates

ruby.x86_64 1.9.3.392-29.fc18 @updates

ruby-augeas.x86_64 0.4.1-4.fc18 @fedora

ruby-irb.noarch 1.9.3.392-29.fc18 @updates

ruby-libs.x86_64 1.9.3.392-29.fc18 @updates

ruby-shadow.x86_64 1.4.1-17.fc18 @fedora

rubygem-bigdecimal.x86_64 1.1.0-29.fc18 @updates

rubygem-io-console.x86_64 0.3-29.fc18 @updates

rubygem-json.x86_64 1.6.8-1.fc18 @updates

rubygem-rdoc.noarch 3.12-6.fc18 @updates

rubygems.noarch 1.8.25-6.fc18 @updates

--
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+unsubscribe@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.

Search Discussions

  • Pete Brown at May 16, 2013 at 11:39 pm
    Hi Tom,

    Fedora 18 is the standard environment for new nodes in my environemnt and I
    have never had this issue getting puppet to work.
    Admittedly I have two repos setup, one for fedora 17 with a low priority
    and one for 18 with normal priority.
    I was running the fedora 17 repos before they started releasing packages
    for 18 and still had no issues like the one you describe

    How did you setuo your repositories?


    On 17 May 2013 09:22, Tom Poulton wrote:

    I'm using Fedora 18 KDE in VirtualBox, fresh install this morning with
    full updates using yum.

    I installed puppet by adding the puppet labs yum repo and then "sudo yum
    install puppet", so now I'm running puppet version 3.1.1

    Running "puppet --version" or "sudo puppet agent --test" gave me the
    following error:

    */usr/share/rubygems/rubygems/custom_require.rb:36:in `require': cannot
    load such file -- puppet/util/command_line (LoadError)*
    * from /usr/share/rubygems/rubygems/custom_require.rb:36:in `require'*
    * from /usr/bin/puppet:3:in `<main>'*

    As far as I can tell with my limited knowledge of Ruby, Linux and Puppet,
    /usr/bin/puppet has a line "require 'puppet/util/command_line'" which
    executes via /usr/bin/ruby. The custom_require.rb script (part of ruby)
    then looks for a file puppet/util/command_line relative to itself which it
    can't find.

    Looking at an AWS Linux box where puppet is working, I can see that the
    custom_require.rb file is located at
    /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb, whereas on my
    Fedora box the file is located at
    /usr/share/rubygems/rubygems/custom_require.rb, the problem is that puppet
    has installed it's ruby files in /usr/lib/ruby/site_ruby/1.8, but they
    should actually be in /usr/share/rubygems.

    The first fix was to add "RUBYLIB=/usr/lib/ruby/site_ruby/1.8" in
    /etc/environment and "export RUBYLIB=/usr/lib/ruby/site_ruby/1.8" at the
    beginning of /etc/rc.d/init.d/puppet but that felt pretty dirty so now I've
    done this:

    *sudo mv /usr/lib/ruby/site_ruby/1.8/* /usr/share/rubygems/
    *
    *sudo rm -r /usr/lib/ruby/site_ruby/1.8
    *
    *sudo ln -s /usr/share/rubygems /usr/lib/ruby/site_ruby/1.8*

    If anyone has a better solution I'm all ears, ideally I'd like to just use
    yum for puppet and any of it's dependencies, tweak the puppet.conf file and
    everything work (like it does in EC2, etc), Do I have to install another
    version of ruby?? Or set an environment variable before installing puppet
    so it knows where to put the files?? Maybe it's just Fedora's weird ruby
    install process?

    Here's a yum list just in case:

    $ sudo yum list installed | grep ruby
    libselinux-ruby.x86_64 2.1.12-7.3.fc18 @updates

    ruby.x86_64 1.9.3.392-29.fc18 @updates

    ruby-augeas.x86_64 0.4.1-4.fc18 @fedora

    ruby-irb.noarch 1.9.3.392-29.fc18 @updates

    ruby-libs.x86_64 1.9.3.392-29.fc18 @updates

    ruby-shadow.x86_64 1.4.1-17.fc18 @fedora

    rubygem-bigdecimal.x86_64 1.1.0-29.fc18 @updates

    rubygem-io-console.x86_64 0.3-29.fc18 @updates

    rubygem-json.x86_64 1.6.8-1.fc18 @updates

    rubygem-rdoc.noarch 3.12-6.fc18 @updates

    rubygems.noarch 1.8.25-6.fc18 @updates

    --
    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+unsubscribe@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.

    --
    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+unsubscribe@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.
  • Tom Poulton at May 17, 2013 at 8:04 pm
    I setup the Puppet Labs yum repo via "sudo rpm -ivh
    http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm
    "

    So far between me and a colleague we've tried:
    F18 GNOME:
    Seemed fine I think (but GNOME 3 didn't play nice with VirtualBox, very
    very slow)

    F18 KDE: Initially running Puppet 2.7.X
    The client worked fine but the Puppet Dashboard kept throwing errors that's
    what made me realise we were running 2.7 (I didn't bother to check the yum
    install process as I assumed the Fedora repo would be up to date)

    F18 KDE: Running Puppet 3.1.1
    Ruby errors above. I upgraded my colleagues machine today and ran into
    exactly the same problem

    From that I'm thinking this might be specific to the F18 KDE version, maybe
    ruby is setup in an odd fashion on this spin??

    --
    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+unsubscribe@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.
  • Matthaus Owens at May 17, 2013 at 8:35 pm
    Tom,
    Why are installing the EL 6 release package for Fedora 18? Have you
    tried http://yum.puppetlabs.com/fedora/f18/products/i386/puppetlabs-release-18-7.noarch.rpm
    instead?
    On Fri, May 17, 2013 at 1:04 PM, Tom Poulton wrote:
    I setup the Puppet Labs yum repo via "sudo rpm -ivh
    http://yum.puppetlabs.com/el/6/products/i386/puppetlabs-release-6-6.noarch.rpm"

    So far between me and a colleague we've tried:
    F18 GNOME:
    Seemed fine I think (but GNOME 3 didn't play nice with VirtualBox, very very
    slow)

    F18 KDE: Initially running Puppet 2.7.X
    The client worked fine but the Puppet Dashboard kept throwing errors that's
    what made me realise we were running 2.7 (I didn't bother to check the yum
    install process as I assumed the Fedora repo would be up to date)

    F18 KDE: Running Puppet 3.1.1
    Ruby errors above. I upgraded my colleagues machine today and ran into
    exactly the same problem

    From that I'm thinking this might be specific to the F18 KDE version, maybe
    ruby is setup in an odd fashion on this spin??

    --
    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+unsubscribe@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.


    --
    Matthaus Owens
    Release Manager, Puppet Labs

    Join us at PuppetConf 2013, August 22-23 in San Francisco -
    http://bit.ly/pupconf13
    Register now and take advantage of the Early Bird discount - save 25%!

    --
    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+unsubscribe@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.
  • Tom Poulton at May 17, 2013 at 10:44 pm
    Hahaha, I didn't even think about that, I just copied the script blindly
    from out EC2 setup, that'll teach me

    I'll test it out on Monday morning and update

    If that is the answer: thanks in advance

    Tom

    --
    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+unsubscribe@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.
  • Tom Poulton at May 20, 2013 at 10:18 pm
    Yep that worked, I had to enable the puppetlabs-devel repo in
    /etc/yum.repos.d/puppetlabs.repo (instead of "yum
    --enablerepo=puppetlabs-devel") but it works fine now, lesson learned :)

    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+unsubscribe@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.
  • Tom Poulton at May 20, 2013 at 10:36 pm
    Wait... spoke too soon:

    *Error: Could not start Service[puppet]: Execution of '/sbin/service puppet
    start' returned 6: *
    *Error: /Stage[main]/Puppet/Service[puppet]/ensure: change from stopped to
    running failed: Could not start Service[puppet]: Execution of
    '/sbin/service puppet start' returned 6:*

    If I do "sudo service puppet start":
    *Redirecting to /bin/systemctl start puppet.service*
    *Failed to issue method call: Unit puppet.service failed to load: No such
    file or directory. See system logs and 'systemctl status puppet.service'
    for details.*
    *
    *
    The only puppet service files are below and there's no puppet file in
    /etc/init.d/:
    /usr/lib/systemd/system/puppetagent.service
    /usr/share/puppet/ext/systemd/puppetagent.service
    /usr/share/puppet/ext/systemd/puppetmaster.service

    Any ideas? Is this just another stupid mistake?

    --
    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+unsubscribe@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.
  • Craig White at May 20, 2013 at 11:15 pm
    It would seem that the puppet package has been removed/changed. Reinstall it again.

    Craig
    On May 20, 2013, at 3:36 PM, Tom Poulton wrote:

    Wait... spoke too soon:

    Error: Could not start Service[puppet]: Execution of '/sbin/service puppet start' returned 6:
    Error: /Stage[main]/Puppet/Service[puppet]/ensure: change from stopped to running failed: Could not start Service[puppet]: Execution of '/sbin/service puppet start' returned 6:

    If I do "sudo service puppet start":
    Redirecting to /bin/systemctl start puppet.service
    Failed to issue method call: Unit puppet.service failed to load: No such file or directory. See system logs and 'systemctl status puppet.service' for details.

    The only puppet service files are below and there's no puppet file in /etc/init.d/:
    /usr/lib/systemd/system/puppetagent.service
    /usr/share/puppet/ext/systemd/puppetagent.service
    /usr/share/puppet/ext/systemd/puppetmaster.service

    Any ideas? Is this just another stupid mistake?

    --
    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+unsubscribe@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.
    --
    Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ craig.white@ttiltd.com
    1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ www.ttiassessments.com

    Using Assessments to Create Agile Organizations Webinar
    https://www4.gotomeeting.com/register/480934271

    March 21, 2013, 12pm EDT
    Transform your company into a thriving, agile organization that is
    able to respond immediately to changing customer demands.


    --
    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+unsubscribe@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.
  • Pete Brown at May 21, 2013 at 12:44 am
    Yeah they switched to systemd on fedora so the init scripts went away
    (finally!)
    They also renamed the "service" to puppetagent
    Try this.
    systemctl start puppetagent

    On 21 May 2013 08:36, Tom Poulton wrote:

    Wait... spoke too soon:

    *Error: Could not start Service[puppet]: Execution of '/sbin/service
    puppet start' returned 6: *
    *Error: /Stage[main]/Puppet/Service[puppet]/ensure: change from stopped
    to running failed: Could not start Service[puppet]: Execution of
    '/sbin/service puppet start' returned 6:*

    If I do "sudo service puppet start":
    *Redirecting to /bin/systemctl start puppet.service*
    *Failed to issue method call: Unit puppet.service failed to load: No such
    file or directory. See system logs and 'systemctl status puppet.service'
    for details.*
    *
    *
    The only puppet service files are below and there's no puppet file in
    /etc/init.d/:
    /usr/lib/systemd/system/puppetagent.service
    /usr/share/puppet/ext/systemd/puppetagent.service
    /usr/share/puppet/ext/systemd/puppetmaster.service

    Any ideas? Is this just another stupid mistake?

    --
    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+unsubscribe@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.

    --
    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+unsubscribe@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.
  • Tom Poulton at May 21, 2013 at 2:41 pm
    So I get the move to systemd (whatever that is) if that's what Fedora uses,
    but why rename the "service", that means I have to add a special case in my
    puppet module just for Fedora to set the name of the service resource to
    "puppetagent"? Unless it's a change they're going to roll out to all their
    supported environments in which case that makes sense (sort of)!?

    --
    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+unsubscribe@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.
  • Pete Brown at May 22, 2013 at 2:19 am

    On 22 May 2013 00:41, Tom Poulton wrote:

    So I get the move to systemd (whatever that is) if that's what Fedora
    uses, but why rename the "service", that means I have to add a special case
    in my puppet module just for Fedora to set the name of the service resource
    to "puppetagent"? Unless it's a change they're going to roll out to all
    their supported environments in which case that makes sense (sort of)!?
    Yeah I am not sure about that either and yes it does seem weird to me as
    well given it's supposed to be OS agnostic..
    puppet and puppet-master are in the testing repo for fedora so maybe it's a
    future "update" for all operating systems.


    --
    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+unsubscribe@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.

    --
    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+unsubscribe@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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 16, '13 at 11:22p
activeMay 22, '13 at 2:19a
posts11
users4
websitepuppetlabs.com

People

Translate

site design / logo © 2021 Grokbase