Ask Your Question
1

http://169.254.169.254/2009-04-04/meta-data/instance-id failed - Permission denied (publickey)

asked 2016-06-27 17:55:59 -0500

beinghuman gravatar image

updated 2016-06-28 04:16:50 -0500

Hi Everyone,

I have followed Liberty openstack install on Ubuntu 14.04 using the following tutorial, http://docs.openstack.org/liberty/ins... I have followed each and every instruction as is and everything works fine except the fact that i cant SSH into the instance using its created key. After digging in i could see the following logs and they indicate something to do with metadata not reachable and inject the new key into the instance. Below are the logs,

2016-06-27 22:31:11,185 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [50/120s]: request error [(<urllib3.connectionpool.HTTPConnectionPool object at 0x7f0c7d623890>, 'Connection to 169.254.169.254 timed out. (connect timeout=50.0)')]

2016-06-27 22:32:02,311 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [101/120s]: request error [(<urllib3.connectionpool.HTTPConnectionPool object at 0x7f0c7d6239d0>, 'Connection to 169.254.169.254 timed out. (connect timeout=50.0)')]

2016-06-27 22:32:20,407 - url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [119/120s]: request error [(<urllib3.connectionpool.HTTPConnectionPool object at 0x7f0c7d623890>, 'Connection to 169.254.169.254 timed out. (connect timeout=17.0)')]

2016-06-27 22:32:21,424 - DataSourceEc2.py[CRITICAL]: Giving up on md from ['http://169.254.169.254/2009-04-04/meta-data/instance-id'] after 120 seconds
2016-06-27 22:33:11,568 - url_helper.py[WARNING]: Calling 'http://10.0.0.2//latest/meta-data/instance-id' failed 

[50/120s]: request error [(<urllib3.connectionpool.HTTPConnectionPool object at 0x7f0c7d6238d0>, 'Connection to 10.173.251.18 timed out. (connect timeout=50.0)')]

2016-06-27 22:34:02,691 - url_helper.py[WARNING]: Calling 'http://10.0.0.2//latest/meta-data/instance-id' failed [101/120s]: request error [(<urllib3.connectionpool.HTTPConnectionPool object at 0x7f0c7d623a90>, 'Connection to 10.173.251.18 timed out. (connect timeout=50.0)')]

2016-06-27 22:34:20,783 - url_helper.py[WARNING]: Calling 'http://10.0.0.2//latest/meta-data/instance-id' failed [119/120s]: request error [(<urllib3.connectionpool.HTTPConnectionPool object at 0x7f0c7d623a50>, 'Connection to 10.173.251.18 timed out. (connect timeout=17.0)')]

2016-06-27 22:34:21,800 - DataSourceCloudStack.py[CRITICAL]: Giving up on waiting for the metadata from ['http://10.0.0.2//latest/meta-data/instance-id'] after 120 seconds

10.0.0.2 is my controller where metadata agent is running. I have tried almost everything that i could to try and fix this problem but havent found a solution yet. Can anyone shed some light if they have come across such an issue? Any help is appreciated. Thank you!

edit retag flag offensive close merge delete

Comments

Have you checked the security groups, and see that the assigned security group has ICMP/SSH ports open and enabled.

Syed Awais Ali gravatar imageSyed Awais Ali ( 2016-06-28 04:36:31 -0500 )edit

Hi Syed. I have checked the Security group and the permissions look fine as i can connect to the instance on port 22. Problem is when i launch a new instance my created or imported key doesnt get injected into it. Because of that i cant SSH into it using the downloaded key. I am really stuck here :(

beinghuman gravatar imagebeinghuman ( 2016-06-28 14:13:14 -0500 )edit

I can only see errors such as "Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed" in the instance logs. It does seem like the instance is not able to access metadata from which it would grab the assigned key but not sure how to resolve this. Has anyone seen this problem?

beinghuman gravatar imagebeinghuman ( 2016-06-28 14:17:37 -0500 )edit

Which network did you attach the instance to? It should be connected to an internal network with DHCP enabled. I've seen this come up when users attempt to launch instances on the Public Network (Floating IP pool network.)

mpetason gravatar imagempetason ( 2016-06-29 16:14:38 -0500 )edit

Instance is attached to private network(172.16.1.0/24) and its getting the DHCP allocated IP 172.16.1.3. I am still struggling with this. Is there anything else i should be checking to get this working?

beinghuman gravatar imagebeinghuman ( 2016-06-30 00:18:20 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2016-06-30 16:03:08 -0500

beinghuman gravatar image

root@controller:~# neutron agent-list +--------------------------------------+--------------------+------------+-------+----------------+---------------------------+ | id | agent_type | host | alive | admin_state_up | binary | +--------------------------------------+--------------------+------------+-------+----------------+---------------------------+ | 2ca95c31-1385-4e37-9472-fc5770f00067 | DHCP agent | controller | :-) | True | neutron-dhcp-agent | | 46484d12-d55e-48c5-be2a-6322c8a15b64 | Linux bridge agent | compute | :-) | True | neutron-linuxbridge-agent | | 499621d4-c05a-420e-af2b-90223b1e9b01 | L3 agent | controller | :-) | True | neutron-l3-agent | | 99ea9ed1-4635-496e-b1d1-ef2e12974592 | Linux bridge agent | controller | :-) | True | neutron-linuxbridge-agent | | caadaf78-7176-4bb9-8bb4-255398fd9fd8 | Metadata agent | controller | :-) | True | neutron-metadata-agent | +--------------------------------------+--------------------+------------+-------+----------------+---------------------------+

Neutron metadata agent is up and running.

edit flag offensive delete link more

Comments

i dont see any errors as well in the logs. Can someone please help?

beinghuman gravatar imagebeinghuman ( 2016-06-30 16:04:19 -0500 )edit

What is the output of netstat -rn on that instance? Ensure your image has a correct route definition. Is cloud-init running on your instance? Maybe this helps a little: http://heiterbiswolkig.blogs.nde.ag/2015/09/16/suse-cloud-user-data/ (link text)

eblock gravatar imageeblock ( 2016-07-01 02:07:09 -0500 )edit

I've had the same scenario. after following https://www.technovelty.org/linux/running-cloud-images-locally.html (https://www.technovelty.org/linux/run...) I still get tionPool(host='169.254.169.254', port=80): Max retries exceeded with url: /2009-04-04/meta-data/instance-id (Caused by ConnectTimeoutError(

NirLevy gravatar imageNirLevy ( 2016-07-04 11:33:15 -0500 )edit

netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 192.168.13.1 0.0.0.0 UG 0 0 0 br0 169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 ens2f0

NirLevy gravatar imageNirLevy ( 2016-07-04 11:34:26 -0500 )edit

$ netstat -rn Destination Gateway Genmask Flags MSS Window irtt Iface 0.0.0.0 10.173.251.17 0.0.0.0 UG 0 0 0 eth0 10.173.251.16 0.0.0.0 255.255.255.240 U 0 0 0 eth0 169.254.169.254 10.173.251.18 255.255.255.255 UGH

beinghuman gravatar imagebeinghuman ( 2016-07-06 14:31:58 -0500 )edit
-1

answered 2016-09-20 01:41:23 -0500

naveenkumar gravatar image

hi i am not able to access meta-data service using curl http://169.254.169.254 ..how to set up meta -data please help me

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2016-06-27 17:55:59 -0500

Seen: 6,416 times

Last updated: Sep 20 '16