Ubuntu: Fresh Install Ubuntu 14.04 Server Slow Boot due to failure to connect 169.254.169.254



Question:

Have just installed Ubuntu Server 14.04 and have no VM instances operational. Boot time takes an eternity and on pressing F1 during loading this is what I see, the continued connect attempts and failures are endless any straightforward fixes would be appreciated (Note have replaced http with LINK in the log mentions to enable this posting):-

  Cloud-init v. 0.7.5 running 'init-local' at Tue, 06 May 2014 19:42:27 +0000. Up 359.24 seconds.  Cloud-init v. 0.7.5 running 'init' at Tue, 06 May 2014 19:42:31 +0000. Up 363.43 seconds.  ci-info: +++++++++++++++++++++++Net device info++++++++++++++++++++++++  ci-info: +--------+-------+-----------+-----------+-------------------+  ci-info: | Device |   Up  |  Address  |    Mask   |     Hw-Address    |  ci-info: +--------+-------+-----------+-----------+-------------------+  ci-info: |   lo   |  True | 127.0.0.1 | 255.0.0.0 |         .         |  ci-info: |  em1   | False |     .     |     .     | 9c:b6:54:02:0d:ab |  ci-info: +--------+-------+-----------+-----------+-------------------+  ci-info: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!Route info failed!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!  2014-05-06 20:42:33,252 - url_helper.py[WARNING]: Calling 'LINK://169.254.169.254/2009-04-04/meta-data/instance-id' failed [0/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by : [Errno 101] Network is unreachable)]  2014-05-06 20:42:34,255 - url_helper.py[WARNING]: Calling 'LINK://169.254.169.254/2009-04-04/meta-data/instance-id' failed [1/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by : [Errno 101] Network is unreachable)]  2014-05-06 20:42:35,259 - url_helper.py[WARNING]: Calling 'LINK://169.254.169.254/2009-04-04/meta-data/instance-id' failed [2/120s]: request error [HTTPConnectionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by : [Errno 101] Network is unreachable)]  


Solution:1

You must be running the cloud version of Ubuntu server. cloud-init is attempting to contact 169.254.169.254, a link-local IP address that cloud providers listen on to provide metadata about the VM being initialized.

You can prevent cloud-init from querying any remote servers by setting the datasources_list setting to None.

In practice, this means changing the file /etc/cloud/cloud.cfg.d/90_dpkg.cfg from:

# to update this file, run dpkg-reconfigure cloud-init  datasource_list: [ NoCloud, ConfigDrive, OpenNebula, Azure, AltCloud, OVF, MAAS, GCE, OpenStack, CloudSigma, Ec2, CloudStack, None ]  

to:

# to update this file, run dpkg-reconfigure cloud-init  datasource_list: [ None ]  

If possible, you'll want to run dpkg-reconfigure cloud-init to make the change.


Solution:2

Yes, and in our case, we had to use [ OpenStack ] as opposed to [ None ] in our cloud image's /etc/cloud/cloud.cfg.d/90_dpkg.cfg file, as that was the acceptable Datasource type for our cloud OS. This issue manifested when we started using our existing icehouse friendly images in a juno cloud. No other OS had this issue except our 14.04 image.
We also based our 14.04 image on the Canonical Cloud version.


Solution:3

In my case (new install using Ubuntu Juju) the problem was that neutron was misconfigured with the wrong ip address for the metadata server.

This is good: http://techbackground.blogspot.ie/2013/06/metadata-via-dhcp-namespace.html

That pointed me at: root@neutron:/etc/neutron# cat metadata_agent.ini

    ...    nova_metadata_ip = 192.168.100.151    nova_metadata_port = 8775      ...  

I fixed the nova_metadata_ip adn restarted the neutron metadata service and that solved the issue.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »