[Bug 997641] Re: Could not run Puppet configuration client: Could not retrieve local facts: bad URI

Adam Gandelman 997641 at bugs.launchpad.net
Mon Jun 4 22:56:06 UTC 2012


Martijn-

This is the expected behavior of the ec2 fact that ships with facter.
If it can connect to a webserver at http://169.254.169.254:80 (the
expected location of the meta-data server on Amazon EC2), it will
attempt to traverse the directory structure and populate facts with bits
of meta-data related to the instance.  It seems like, in your case,
there is something else serving requests at
http://169.254.169.254/2008-02-01/meta-data, but instead of serving a
directory structure its serving a HTML file. Facter is using each line
of this file as possible directories to query, hence the InvalidURI
exception from ruby when trying to connect to
http://169.254.169.254/2008-02-01/meta-data/<html> (which is probably
the first line of the HTML file being served)

I'm curious to know about the environment you're running this in.  Is
this cloud infrastructure or a data center?  Perhaps your firewall is
redirecting all requests to 169.254.169.254 somewhere else?  If this is
Openstack. perhaps nova network is not properly forwarding requests to
the meta-data service and they instead hit a webserver on the compute
node?

In any case, there is unfortunately no way to have puppet or facter
avoid running certain facts contained within its configured fact
library.   One work around, if you do not need access to the related EC2
facts, is to remove that specific fact from your facter library
directory: /usr/lib/ruby/1.8/facter/ec2.rb.   Another option is to block
outbound requests to 169.254.169.254 in a way that would cause an
initial probe of port 80 to fail.

** Changed in: facter (Ubuntu)
       Status: New => Triaged

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to facter in Ubuntu.
https://bugs.launchpad.net/bugs/997641

Title:
  Could not run Puppet configuration client: Could not retrieve local
  facts: bad URI

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/facter/+bug/997641/+subscriptions



More information about the Ubuntu-server-bugs mailing list