No access to metadata (169.254.169.254) from inside instance

Follow

Eucalyptus Versions:  3.0 - Current

Problem

Your instance, upon launch, reports that there is no route to the metadata service. This may manifest itself in a HTTP 404 error when trying to access 169.254.169.254/latest/meta-data, or if you're using cloud-init with an error similar to:

DataSourceEc2.py[WARNING]:'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: url error [timed out]

Running the following command inside the instance:

route -n

Reveals a route for the 169.254.0.0 network, like this:

169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 em1

Resolution

When building your image, remove the zeroconf route by editing the ifcfg-ethX file in /etc/sysconfig/network-scripts/ and adding the following parameter:

NOZEROCONF=yes

Cause

By default, an install of Linux may leave the default zeroconf route in place.  This route can cause problems for the instance trying to access the metadata service on 169.254.169.254.  Zeroconf is an automatic network configuration mechanism, for more information see here.

tags: error, metadata, meta-data, 404, not found, timed out, networking

Have more questions? Submit a request

Comments

Powered by Zendesk