Ask Your Question
1

url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed bad status code [400]

asked 2014-11-11 08:11:09 -0500

svkap gravatar image

Hello,

I have installed OpenStack (juno) latest version on Ubuntu 14.04.1 LTS. I have all services running on the same machine and I have configured simple flat network 192.168.3.0/24 with external router 192.168.3.1. The OpenStack machine has IP 192.168.3.2. Everything seems to work (the VMs get IP address from 192.168.3.0/24 network and I am able to ping them). However, the machines seem to have problem with accessing metadata service. I have configured my router (192.168.3.1) with 2 network interfaces (eth0 - 192.168.3.1 and eth0:1 - 169.254.169.254). I have configured NAT rules (DNAT + SNAT) on the router to send the requests to 169.254.169.254:80 back to 192.168.3.2:8775 . If I do "curl http://169.254.169.254%22 (http://169.254.169.254") from 192.168.3.2 I get response: 1.0 2007-01-19 2007-03-01 2007-08-29 2007-10-10 2007-12-15 2008-02-01 2008-09-01 2009-04-04 .

However, my VM cannot connect to metadata service and I get:

url_helper.py[WARNING]: Calling 'http://169.254.169.254/2009-04-04/meta-data/instance-id' failed [0/120s]: bad status code [400] ..... ..... url_helper.py[WARNING]: Calling 'http://192.168.3.11//latest/meta-data/instance-id' failed [0/120s]: request error [HTTPConnectionPool(host='192.168.3.11', port=80): Max retries exceeded with url: //latest/meta-data/instance-id (Caused by <class 'socket.error'="">: [Errno 111] Connection refused)]

I have no idea why it tries to fall back to IP 192.168.3.11 and why the call to 169.254.169.254 does not work.

The VM is a Ubuntu 14.04 cloud image. I have tried with Cirros-0.3.3 but it cannot access the metadata service as well . As a result the VMs cannot get the shared key pair and I am not able to login.

If I do "curl http://169.254.169.254/2009-04-04/%22 (http://169.254.169.254/2009-04-04/") I get:

400 Bad Request

X-Instance-ID header is missing from request.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2014-11-11 10:59:04 -0500

bishoy gravatar image

First,You are using all in one you don't need nova-metadata-api. make sure the service nova-metadata-api is stopped and nova-api is working properly. Maybe try adding also metadata keyword to enabled_apis in nova.conf

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

1 follower

Stats

Asked: 2014-11-11 08:11:09 -0500

Seen: 7,934 times

Last updated: Nov 11 '14