1

I have a local Vagrant set-up running on my machine building out a Ubuntu 14.04 box with a LAMP stack. Vagrant kicks off the process to initialise the box and then it kicks into a puppet script to build and configure the box to my requirements.

I've destroyed and re-built this box many times with no issues, however as of yesterday I have started to get an error (see output below) complaining about being unable to get facter facts. Nothing has changed so I'm not sure why this is the case. I have other colleagues who can checkout the same code base and build this box with no issue. Would appreciate some help or direction as to how I can get to the bottom of this.

vagrant@rentpro-web:~$ puppet apply -vv --debug --environment development --modulepath=/etc/modules/ /etc/manifests/site.pp
Debug: Runtime environment: puppet_version=3.8.4, ruby_version=1.9.3, run_mode=user, default_encoding=UTF-8
Debug: Evicting cache entry for environment 'development'
Debug: Caching environment 'development' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'development'
Debug: Caching environment 'development' (ttl = 0 sec)
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/serverdensity_agent/lib/facter/sd.rb
Debug: Loading facts from /etc/puppet/modules/serverdensity_agent/lib/facter/agent_key.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/root_home.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/apt/lib/facter/apt_updates.rb
Debug: Loading facts from /etc/puppet/modules/apt/lib/facter/apt_update_last_success.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/git/lib/facter/git_version.rb
Debug: Loading facts from /etc/puppet/modules/git/lib/facter/git_html_path.rb
Debug: Loading facts from /etc/puppet/modules/git/lib/facter/git_exec_path.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/collectd/lib/facter/collectd_version.rb
Error: Could not run: Could not retrieve facts for rentpro-web.rentpro.local: Invalid facter option(s) timeout

UPDATE: Puppet trace

vagrant@rentpro-web:~$ sudo puppet apply -vv --debug --environment development --modulepath=/etc/puppet/modules/ /etc/puppet/manifests/site.pp --trace

Warning: Setting templatedir is deprecated. See http://links.puppetlabs.com/env-settings-deprecations 
    (at /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1139:in `issue_deprecation_warning'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1126:in `block in issue_deprecations'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1125:in `each'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:1125:in `issue_deprecations'; /usr/lib/ruby/vendor_ruby/puppet/settings.rb:347:in `initialize_app_defaults'; /usr/lib/ruby/vendor_ruby/puppet.rb:157:in `do_initialize_settings_for_run_mode'; /usr/lib/ruby/vendor_ruby/puppet.rb:141:in `initialize_settings'; /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:87:in `block in execute'; /usr/lib/ruby/vendor_ruby/puppet/util.rb:496:in `exit_on_fail'; /usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:86:in `execute'; /usr/bin/puppet:8:in `<main>')
Debug: Runtime environment: puppet_version=3.8.4, ruby_version=1.9.3, run_mode=user, default_encoding=UTF-8
Debug: Evicting cache entry for environment 'development'
Debug: Caching environment 'development' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'development'
Debug: Caching environment 'development' (ttl = 0 sec)
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/serverdensity_agent/lib/facter/sd.rb
Debug: Loading facts from /etc/puppet/modules/serverdensity_agent/lib/facter/agent_key.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/root_home.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Debug: Loading facts from /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/apt/lib/facter/apt_updates.rb
Debug: Loading facts from /etc/puppet/modules/apt/lib/facter/apt_update_last_success.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/concat/lib/facter/concat_basedir.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/git/lib/facter/git_version.rb
Debug: Loading facts from /etc/puppet/modules/git/lib/facter/git_html_path.rb
Debug: Loading facts from /etc/puppet/modules/git/lib/facter/git_exec_path.rb
Info: Loading facts
Debug: Loading facts from /etc/puppet/modules/collectd/lib/facter/collectd_version.rb
Error: Could not run: Could not retrieve facts for rentpro-web.rentpro.local: Invalid facter option(s) timeout
/usr/lib/ruby/vendor_ruby/facter/util/collection.rb:60:in `add'
/usr/lib/ruby/vendor_ruby/facter.rb:128:in `add'
/etc/puppet/modules/serverdensity_agent/lib/facter/agent_key.rb:5:in `<top (required)>'
/usr/lib/ruby/vendor_ruby/facter/util/loader.rb:95:in `load'
/usr/lib/ruby/vendor_ruby/facter/util/loader.rb:95:in `load_file'
/usr/lib/ruby/vendor_ruby/facter/util/loader.rb:46:in `block (2 levels) in load_all'
/usr/lib/ruby/vendor_ruby/facter/util/loader.rb:41:in `each'
/usr/lib/ruby/vendor_ruby/facter/util/loader.rb:41:in `block in load_all'
/usr/lib/ruby/vendor_ruby/facter/util/loader.rb:38:in `each'
/usr/lib/ruby/vendor_ruby/facter/util/loader.rb:38:in `load_all'
/usr/lib/ruby/vendor_ruby/facter/util/collection.rb:115:in `load_all'
/usr/lib/ruby/vendor_ruby/facter.rb:118:in `block (2 levels) in singletonclass'
/usr/lib/ruby/vendor_ruby/puppet/indirector/facts/facter.rb:23:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/lib/ruby/vendor_ruby/puppet/node.rb:116:in `fact_merge'
/usr/lib/ruby/vendor_ruby/puppet/indirector/node/plain.rb:17:in `find'
/usr/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:201:in `find'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:200:in `block in main'
/usr/lib/ruby/vendor_ruby/puppet/context.rb:64:in `override'
/usr/lib/ruby/vendor_ruby/puppet.rb:246:in `override'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:198:in `main'
/usr/lib/ruby/vendor_ruby/puppet/application/apply.rb:159:in `run_command'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in `block (2 levels) in run'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:507:in `plugin_hook'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in `block in run'
/usr/lib/ruby/vendor_ruby/puppet/util.rb:496:in `exit_on_fail'
/usr/lib/ruby/vendor_ruby/puppet/application.rb:381:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:146:in `run'
/usr/lib/ruby/vendor_ruby/puppet/util/command_line.rb:92:in `execute'
/usr/bin/puppet:8:in `<main>'
Adrian Walls
  • 852
  • 3
  • 19
  • 31
  • You are running `puppet` without root permissions. Is that on purpose? Can you add the `--trace` option and share the first 5 or 6 lines of backtrace? – Felix Frank Jan 15 '16 at 11:41
  • 1
    Hmm, this isn't super clear, but I'm inclined to blame the `agent_key` fact from your `serverdensity_agent` module. Cannot really say more without seeing what that does. – Felix Frank Jan 15 '16 at 12:24
  • 1
    The ServerDensity module is pulled in from here if that's of any benefit - https://github.com/serverdensity/puppet-serverdensity – Adrian Walls Jan 15 '16 at 16:10
  • Is there a reason why you're not using Vagrant's built-in Puppet provisioner? – Patrick Lee Jan 17 '16 at 18:48
  • Yes, Vagrant builds our base development box and we use AWS CloudFormation to build our stage and production boxes. Once the base machine has been provisioned in all cases we launch into a Puppet script to build, deploy and configure our application on that box. This Puppet script is the same across all environments. – Adrian Walls Jan 18 '16 at 08:31

0 Answers0