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

14.04bootcloud-initserversoftware installation

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)]

Best Answer

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.

Related Question