Facter throwing MySQL errors

46 views
Skip to first unread message

Jonathan Gazeley

unread,
May 29, 2015, 5:21:33 AM5/29/15
to puppet...@googlegroups.com
Hi folks,

Since upgrading to Puppet 3.8.1 my Facter (2.4.4) has been throwing this
error every run:

[jg4461@webdev-ispms ~]$ facter
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)

I initially assumed it was a bad custom fact but none of them attempt to
connect to MySQL. When running facts individually, it's mostly the
built-in Puppet facts that throw this error, including facts like
$::disks and $::memoryfree.

I can't figure out what is causing the problem. Any clues?

Thanks,
Jonathan

Martin Alfke

unread,
May 29, 2015, 7:25:56 AM5/29/15
to puppet...@googlegroups.com
Have you tried running facter -p
This will also pull the pluginsynced facts.

(I am unsure which version has puppet facter)
> --
> 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/55682F86.8010808%40bristol.ac.uk.
> For more options, visit https://groups.google.com/d/optout.

Jonathan Gazeley

unread,
May 29, 2015, 7:51:16 AM5/29/15
to puppet...@googlegroups.com
Yes, I tried running facter -p and it produces the same error. The same
error also crops up when puppet or mcollective execute facter too.

Thanks,
Jonathan

Martin Alfke

unread,
May 29, 2015, 9:43:51 AM5/29/15
to puppet...@googlegroups.com
Try facter -p —debug or even facter -p —debug —trace to identify the broken fact which does the mysql connection.

hth,

Martin
> To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/556852A6.7020704%40bristol.ac.uk.

Jonathan Gazeley

unread,
Jun 1, 2015, 5:51:37 AM6/1/15
to puppet...@googlegroups.com
I'm still not convinced this is a broken fact. I ran it in --trace with
"memoryfree" which definitely doesn't build a MySQL connection, and this
is the output:

[jg4461@radius-jg4461 ~]$ facter -p --debug --trace memoryfree
Found no suitable resolves of 1 for ec2_metadata
value for ec2_metadata is still nil
Error loading fact /var/lib/puppet/lib/facter/warranty.rb: no such file
to load -- facter/util/warranty
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/warranty.rb:3
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/virtualenv_version.rb:5
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:4
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `instance_eval'
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:68:in `define_resolution'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter.rb:161:in `add'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `run'
/usr/bin/facter:20
value for pe_version is still nil
value for pe_version is still nil
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
Error loading fact /var/lib/puppet/lib/facter/portage.rb: no such file
to load -- facter/util/portage
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/portage.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/virtualenv_version.rb:5
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:4
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `instance_eval'
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:68:in `define_resolution'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter.rb:161:in `add'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `run'
/usr/bin/facter:20
value for pe_version is still nil
Error loading fact /var/lib/puppet/lib/facter/warranty.rb: no such file
to load -- facter/util/warranty
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/warranty.rb:3
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:4
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `instance_eval'
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:68:in `define_resolution'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter.rb:161:in `add'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `run'
/usr/bin/facter:20
Error loading fact /var/lib/puppet/lib/facter/portage.rb: no such file
to load -- facter/util/portage
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/portage.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:4
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `instance_eval'
/usr/lib/ruby/site_ruby/1.8/facter/util/resolution.rb:81:in `evaluate'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:68:in `define_resolution'
/usr/lib/ruby/site_ruby/1.8/facter/util/fact.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:50:in `add'
/usr/lib/ruby/site_ruby/1.8/facter.rb:161:in `add'
/var/lib/puppet/lib/facter/dell_express_service_code.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `run'
/usr/bin/facter:20
Error loading fact /var/lib/puppet/lib/facter/warranty.rb: no such file
to load -- facter/util/warranty
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/warranty.rb:3
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `run'
/usr/bin/facter:20
Error loading fact /var/lib/puppet/lib/facter/portage.rb: no such file
to load -- facter/util/portage
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`gem_original_require'
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
/var/lib/puppet/lib/facter/portage.rb:1
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:130:in `kernel_load'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:115:in `load_file'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:49:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:47:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/util/loader.rb:45:in `load_all'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:76:in `fact'
/usr/lib/ruby/site_ruby/1.8/facter/util/collection.rb:129:in `value'
/usr/lib/ruby/site_ruby/1.8/facter.rb:117:in `value'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:37:in `run'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `each'
/usr/lib/ruby/site_ruby/1.8/facter/application.rb:35:in `run'
/usr/bin/facter:20
538.27 MB
Reply all
Reply to author
Forward
0 new messages