Ask Your Question
0

vm instance : calling http://169.254.169.254 failed

asked 2015-03-20 02:08:36 -0500

pswen gravatar image

updated 2015-03-20 10:23:45 -0500

dbaxps gravatar image

in vm can get ip from dhcp, but not connect http://169.254.169.254/xxxxx error: TRACE neutron.agent.metadata.agent EndpointNotFound: adminURL endpoint for network service not found

can i configure error ?

endpoint-list
keystone  endpoint-list  | grep '9696' 

id               | c6e20976ec1249c3bbde0849c4e98153  
region        | regionOne  
publicURL  | http://ctrl:9696         
internalURL| http://ctrl:9696         
adminURL  | http://ctrl:9696         
service-id   | 9932c5a3ddd441c4bb8cda81e7ab609d |


my metadata_agent.ini:
[DEFAULT]
debug = True
verbose = True
auth_url = http://ctrl:35357/v2.0
auth_region = RegionOne
admin_tenant_name = service
admin_user = neutron
admin_password = neutron
nova_metadata_ip = ctrl
nova_metadata_port = 8775
metadata_proxy_shared_secret = 123456



***ns-metadata-proxy log***

more  /var/log/neutron/neutron-ns-metadata-proxy-71d2ea5e-92df-43ab-bbf0-24b6a4d5531c.log :
2015-03-20 14:21:19.242 2970 INFO neutron.wsgi [-] (2970) accepted ('192.168.20.21', 43167)
2015-03-20 14:21:19.385 2970 INFO neutron.wsgi [-] 192.168.20.21 - - [20/Mar/2015 14:21:19] "GET /2009-04-04/meta-data/instance-id HTTP/
1.1" 500 342 0.141520

***neutron-metadata-agent log:***

2015-03-20 14:37:30.535 20283 DEBUG neutronclient.client [-] RESP:200 {'date': 'Fri, 20 Mar 2015 06:37:30 GMT', 'content-type': 'applica
tion/json', 'content-length': '2352', 'vary': 'X-Auth-Token'} {"access": {"token": {"issued_at": "2015-03-20T06:37:30.515501", "expires"
: "2015-03-20T07:37:30Z", "id": "57bed5ae4352403dae2d4a7977e981d8", "tenant": {"description": "Service Tenant", "enabled": true, "id": "
6e4473aa5d78439da00a1aa215247819", "name": "service"}, "audit_ids": ["fbi9RNMJTnq-Qm8022QIIQ"]}, "serviceCatalog": [{"endpoints": [{"adm
inURL": "http://ctrl:8774/v2/6e4473aa5d78439da00a1aa215247819", "region": "regionOne", "internalURL": "http://ctrl:8774/v2/6e4473aa5d784
39da00a1aa215247819", "id": "340f61b58f904c6d9ccf936ac1103010", "publicURL": "http://ctrl:8774/v2/6e4473aa5d78439da00a1aa215247819"}], "
endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://ctrl:9696", "region": "regionOne", "intern
alURL": "http://ctrl:9696", "id": "7bccd1c953154aa082dc5ab72dab173f", "publicURL": "http://ctrl:9696"}], "endpoints_links": [], "type": 
"network", "name": "neutron"}, {"endpoints": [{"adminURL": "http://ctrl:8776/v2/6e4473aa5d78439da00a1aa215247819", "region": "regionOne"
, "internalURL": "http://ctrl:8776/v2/6e4473aa5d78439da00a1aa215247819", "id": "0fb0cd79ad0c4693a3d68e19acceef9e", "publicURL": "http://
ctrl:8776/v2/6e4473aa5d78439da00a1aa215247819"}], "endpoints_links": [], "type": "volumev2", "name": "cinderv2"}, {"endpoints": [{"admin
URL": "http://ctrl:9292", "region": "regionOne", "internalURL": "http://ctrl:9292", "id": "14eb49c1847544868a1c7f35b2860b8f", "publicURL
": "http://ctrl:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://ctrl:8776/v1/6e4
473aa5d78439da00a1aa215247819", "region": "regionOne", "internalURL": "http://ctrl:8776/v1/6e4473aa5d78439da00a1aa215247819", "id": "05f
a7af388564953b0d77ddac3348cd7", "publicURL": "http://ctrl:8776/v1/6e4473aa5d78439da00a1aa215247819"}], "endpoints_links": [], "type": "v
olume", "name": "cinder"}, {"endpoints": [{"adminURL": "http://ctrl:35357/v2.0", "region": "regionOne", "internalURL": "http://ctrl:5000
/v2.0", "id": "0c64c41fd865417b91f9faacf85ee282", "publicURL": "http://ctrl:5000/v2.0"}], "endpoints_links": [], "type": "identity", "na
me": "keystone"}], "user": {"username": "neutron", "roles_links": [], "id": "a52b51dbd9044105bebe737bd6b32142", "roles": [{"name": "admi
n"}], "name": "neutron"}, "metadata": {"is_admin": 0, "roles": ["041241a0c91d42eeb45e97acabbf2c4e"]}}}
 http_log_resp /usr/lib/python2.7/site-packages/neutronclient/common/utils.py:149

*2015-03-20 14:37:30.535 20283 ERROR neutron.agent.metadata.agent [-] Unexpected error.
2015-03-20 14:37:30.535 20283 TRACE neutron.agent.metadata.agent Traceback (most recent call last):

2015-03-20 14:37:30.535 20283 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/metadata/agent.p
y", line 125, in __call__
2015-03-20 14:37:30.535 20283 TRACE neutron.agent.metadata.agent     instance_id, tenant_id = self._get_instance_and_tenant_id(req)
2015-03-20 14:37:30.535 20283 TRACE neutron.agent.metadata.agent   File "/usr/lib/python2.7/site-packages/neutron/agent/metadata/agent.p
y", line 189, in _get_instance_and_tenant_id

2015-03-20 14:37:30.535 20283 TRACE neutron.agent.metadata.agent     ports = self._get_ports ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2015-03-20 10:16:10 -0500

dbaxps gravatar image

updated 2015-03-20 10:27:28 -0500

I would verify /etc/neutron/metadata-agent.ini

auth_region = ?
RegionOne or regionOne

and compare with

[root@junoFedora21 ~(keystone_admin)]# keystone service-list | grep neutron
| 52207605d5bb4835926b2a5f7b6685ec |  neutron   |   network    |   Neutron Networking Service   |
[root@junoFedora21 ~(keystone_admin)]# keystone endpoint-list | grep 52207605d5bb4835926b2a5f7b6685ec
| 352bd1070c4549828feeaeea6d2d3fbd | RegionOne |           http://192.168.1.42:9696/            |           http://192.168.1.42:9696/            |         http://192.168.1.42:9696/         | 52207605d5bb4835926b2a5f7b6685ec |

Per your report :- keystone endpoint-list | grep '9696'

id               | c6e20976ec1249c3bbde0849c4e98153  
region        | regionOne  
publicURL  | http://ctrl:9696         
internalURL| http://ctrl:9696         
adminURL  | http://ctrl:9696         
service-id   | 9932c5a3ddd441c4bb8cda81e7ab609d |


my metadata_agent.ini:
[DEFAULT]
debug = True
verbose = True
auth_url = http://ctrl:35357/v2.0
auth_region = RegionOne
admin_tenant_name = service
admin_user = neutron
admin_password = neutron
nova_metadata_ip = ctrl
nova_metadata_port = 8775
metadata_proxy_shared_secret = 123456

Update auth_region = regioneOne

edit flag offensive delete link more

Comments

is worded, Thks!

pswen gravatar imagepswen ( 2015-03-25 02:54:15 -0500 )edit
0

answered 2015-03-20 02:15:13 -0500

pswen gravatar image

iptables rules in netns router:
[root@netnode neutron]# ip netns exec qrouter-71d2ea5e-92df-43ab-bbf0-24b6a4d5531c iptables -t nat -S
-P PREROUTING ACCEPT -P INPUT ACCEPT
-P OUTPUT ACCEPT
-P POSTROUTING ACCEPT
-N neutron-l3-agent-OUTPUT
-N neutron-l3-agent-POSTROUTING
-N neutron-l3-agent-PREROUTING
-N neutron-l3-agent-float-snat
-N neutron-l3-agent-snat
-N neutron-postrouting-bottom
-A PREROUTING -j neutron-l3-agent-PREROUTING
-A OUTPUT -j neutron-l3-agent-OUTPUT
-A POSTROUTING -j neutron-l3-agent-POSTROUTING
-A POSTROUTING -j neutron-postrouting-bottom
-A neutron-l3-agent-OUTPUT -d 10.216.250.132/32 -j DNAT --to-destination 192.168.20.20
-A neutron-l3-agent-OUTPUT -d 10.216.250.131/32 -j DNAT --to-destination 192.168.20.4
-A neutron-l3-agent-POSTROUTING ! -i qg-e124fbbe-33 ! -o qg-e124fbbe-33 -m conntrack ! --ctstate DNAT -j ACCEPT
-A neutron-l3-agent-PREROUTING -d 169.254.169.254/32 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 9697
-A neutron-l3-agent-PREROUTING -d 10.216.250.132/32 -j DNAT --to-destination 192.168.20.20
-A neutron-l3-agent-PREROUTING -d 10.216.250.131/32 -j DNAT --to-destination 192.168.20.4
-A neutron-l3-agent-float-snat -s 192.168.20.20/32 -j SNAT --to-source 10.216.250.132
-A neutron-l3-agent-float-snat -s 192.168.20.4/32 -j SNAT --to-source 10.216.250.131
-A neutron-l3-agent-snat -j neutron-l3-agent-float-snat
-A neutron-l3-agent-snat -s 192.168.20.0/24 -j SNAT --to-source 10.216.250.130
-A neutron-postrouting-bottom -j neutron-l3-agent-snat

listen 9697:
[root@netnode neutron]# ip netns exec qrouter-71d2ea5e-92df-43ab-bbf0-24b6a4d5531c lsof -i :9697
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
neutron-n 2970 root 6u IPv4 2045120 0t0 TCP *:9697 (LISTEN)

edit flag offensive delete link more

Comments

can you post this as answer comment or add to your question.

SGPJ gravatar imageSGPJ ( 2015-03-28 03:47:53 -0500 )edit

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: 2015-03-20 02:08:36 -0500

Seen: 4,167 times

Last updated: Mar 20 '15