部署nova后[root@localhost ~]# openstack host list
Unknown Error (HTTP 503) (Request-ID: req-3dcca84e-1064-40f9-86fb-cc5123cbb1d0)
查看日志发现是token无法取到导致
2016-05-13 15:59:24.014 7413 DEBUG nova.osapi_compute.wsgi.server [-] (7413) accepted ('192.168.1.69', 58744) server /usr/lib/python2.7/site-packages/eventlet/wsgi.py:826
2016-05-13 15:59:24.020 7413 DEBUG keystoneclient.session [-] REQ: curl -g -i -X GET http://127.0.0.1:35357 -H "Accept: application/json" -H "User-Agent: nova/12.0.1 keystonemiddleware.auth_token/2.3.1" _http_log_request /usr/lib/python2.7/site-packages/keystoneclient/session.py:198
2016-05-13 15:59:24.045 7413 DEBUG keystoneclient.session [-] RESP: [300] Content-Length: 589 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.6 (CentOS) mod_wsgi/3.4 Python/2.7.5 Connection: Keep-Alive Date: Fri, 13 May 2016 07:59:24 GMT Content-Type: application/json
RESP BODY: {"versions": {"values": [{"status": "stable", "updated": "2015-03-30T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.4", "links": [{"href": "http://127.0.0.1:35357/v3/", "rel": "self"}]}, {"status": "stable", "updated": "2014-04-17T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v2.0+json"}], "id": "v2.0", "links": [{"href": "http://127.0.0.1:35357/v2.0/", "rel": "self"}, {"href": "http://docs.openstack.org/", "type": "text/html", "rel": "describedby"}]}]}}
_http_log_response /usr/lib/python2.7/site-packages/keystoneclient/session.py:215
2016-05-13 15:59:24.047 7413 DEBUG keystoneclient.auth.identity.v2 [-] Making authentication request to http://127.0.0.1:35357/v2.0/tokens get_auth_ref /usr/lib/python2.7/site-packages/keystoneclient/auth/identity/v2.py:86
2016-05-13 15:59:24.053 7413 DEBUG keystoneclient.session [-] Request returned failure status: 400 request /usr/lib/python2.7/site-packages/keystoneclient/session.py:400
2016-05-13 15:59:24.053 7413 ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400
2016-05-13 15:59:24.053 7413 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Expecting to find username or userId in passwordCredentials - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error.", "code": 400, "title": "Bad Request"}}
2016-05-13 15:59:24.054 7413 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Failed to fetch token data from identity server
2016-05-13 15:59:24.055 7413 INFO nova.osapi_compute.wsgi.server [-] 192.168.1.69 "GET /v2/083d0ed1647148479c54aa8d4959302e/os-hosts HTTP/1.1" status: 503 len: 323 time: 0.0377760
但是单独执行的时候可以取到token
[root@localhost ~]# curl -X POST http://127.0.0.1:35357/v2.0/tokens -d '{"auth":{"passwordCredentials":{"username":"nova", "password":"nova"}}}' -H"Content-type: application/json"
{"access": {"token": {"issued_at": "2016-05-13T08:01:03.701957", "expires": "2016-05-13T09:01:03Z", "id": "18986af5919148f8a0fcc154ccbf9493", "audit_ids": ["2lYf25sNS1erlWp8lYn5mw"]}, "serviceCatalog": [], "user": {"username": "nova", "roles_links": [], "id": "696ae1b1c335498ba64e70454fad5441", "roles": [], "name": "nova"}, "metadata": {"is_admin": 0, "roles": []}}}
想请问一下这个是什么原因导致,万分感谢
|