Puppet agent fails collect packages for puppet "Cannot collect packages for Puppet::Type::package::ProviderYum provider; Failed to list packages"

39 views
Skip to first unread message

Ashwinkumar Kandasamy

unread,
Oct 16, 2019, 12:28:56 PM10/16/19
to Puppet Users
Hi all,
 In my puppet enterprise machine when ever i run the puppet agent -t command it shows below error,
 # puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Loading facts
Error: Cannot collect packages for Puppet::Type::package::ProviderYum provider; Failed to list packages
Info: Caching catalog for ,puppetmaster>
Info: Applying configuration version '1571212307'
Error: Could not prefetch package provider 'yum': Failed to list packages
Error: Failed to apply catalog: Failed to list packages


PE version -2019.0

Josh Cooper

unread,
Oct 16, 2019, 12:48:42 PM10/16/19
to puppet...@googlegroups.com
--
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...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/a41bc387-75f1-499c-9683-ed423d783240%40googlegroups.com.

Try running "puppet resource package --param provider --debug" to see which yum command fails.

--
Josh Cooper | Software Engineer

KevinR

unread,
Oct 17, 2019, 7:32:38 AM10/17/19
to Puppet Users
I sometimes have this issue on one particular node, the cause is that the Yum database gets corrupted on that node sometimes. I've built this Puppet Task to repair the database when it happens:

#!/bin/bash
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
yum clean all
yum check-update
if [ $? == 100 ]; then
  exit 0
fi
Reply all
Reply to author
Forward
0 new messages