Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Bad response code while validating token: 400

Fiz um deploy usando a versão mitaka mas estou tendo erro para utilizar os comandos do neutron pelo horizon eu consigo criar as redes e usar, mas quando vou criar uma instancia da erro. Acredito que seja por causa de não conseguir utilizar os comandos de rede. Tenho 3 nodes, 1 controller, 1 nova e 1 neutron. Segue logs e configurações definidas nos arquivos.

Se alguém puder me ajudar, agradeço


I made a deployment using mitaka version but am having error to use the neutron commands the horizon I can create networks and use, but when I create an instance of the error. I believe it is because of not being able to use the network commands. I have 3 nodes, 1 controller, 1 new and 1 neutron. The following logs and set the file settings.

If anyone can help me, thank you

Controller

/etc/neutron/neutron.conf

[keystone_authtoken]

auth_uri = http://controller:5000/v3
auth_url = http://controller:35357/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
user-name = neutron
password = p3sneutron


[nova]
auth_url = http://controller:35357/v3
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
user_name = nova
password = p3snova

/etc/nova/nova.conf

[keystone_authtoken]
auth_uri = http://controller:5000/v3
auth_url = http://controller:35357/v3
memcached_servers = controller:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = p3snova


[neutron]

url = http://controller:9696
auth_url = http://controller:35357/v3
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = p3sneutron

service_metadata_proxy = True
metadata_proxy_shared_secret = p3smetadata

openstack network list

HttpException: Service Unavailable, 503 Service Unavailable

The server is currently unavailable. Please try again at a later time.

openstack network list --debug

START with options: ['network', 'list', '--debug']
options: Namespace(access_token_endpoint='', auth_type='', auth_url='http://controller:35357/v3', cacert='', client_id='', client_secret='***', cloud='', debug=True, default_domain='default', deferred_help=False, domain_id='', domain_name='', endpoint='', identity_provider='', identity_provider_url='', insecure=None, interface='', log_file=None, os_compute_api_version='', os_dns_api_version='2', os_identity_api_version='3', os_image_api_version='2', os_network_api_version='', os_object_api_version='', os_orchestration_api_version='1', os_project_id=None, os_project_name=None, os_volume_api_version='', password='***', profile=None, project_domain_id='', project_domain_name='default', project_id='', project_name='admin', protocol='', region_name='', scope='', service_provider_endpoint='', timing=False, token='***', trust_id='', url='', user_domain_id='', user_domain_name='default', user_id='', username='admin', verbose_level=3, verify=None)
defaults: {u'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'api_timeout': None, u'baremetal_api_version': u'1', u'image_api_version': u'2', 'cacert': None, u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': u'1', u'interface': None, u'network_api_version': u'2', u'image_format': u'qcow2', u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'verify': True, u'identity_api_version': u'2.0', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', u'container_api_version': u'1', u'dns_api_version': u'2', u'object_store_api_version': u'1', u'disable_vendor_agent': {}}
cloud cfg: {'auth_type': 'password', u'compute_api_version': u'2', 'key': None, u'database_api_version': u'1.0', 'timing': False, u'network_api_version': u'2', u'image_format': u'qcow2', u'image_api_version': '2', 'verify': True, u'dns_api_version': '2', u'object_store_api_version': u'1', 'verbose_level': 3, 'region_name': '', 'api_timeout': None, u'baremetal_api_version': u'1', 'auth': {'username': 'admin', 'project_name': 'admin', 'user_domain_name': 'default', 'auth_url': 'http://controller:35357/v3', 'password': '***', 'project_domain_name': 'default'}, 'default_domain': 'default', u'container_api_version': u'1', u'image_api_use_tasks': False, u'floating_ip_source': u'neutron', u'orchestration_api_version': '1', u'interface': None, 'cacert': None, u'key_manager_api_version': u'v1', u'metering_api_version': u'2', 'deferred_help': False, u'identity_api_version': '3', u'volume_api_version': u'2', 'cert': None, u'secgroup_source': u'neutron', 'debug': True, u'disable_vendor_agent': {}}
compute API version 2, cmd group openstack.compute.v2
network API version 2, cmd group openstack.network.v2
image API version 2, cmd group openstack.image.v2
volume API version 2, cmd group openstack.volume.v2
identity API version 3, cmd group openstack.identity.v3
object_store API version 1, cmd group openstack.object_store.v1
orchestration API version 1, cmd group openstack.orchestration.v1
dns API version 2, cmd group openstack.dns.v2
command: network list -> openstackclient.network.v2.network.ListNetwork
Auth plugin password selected
auth_type: password
Using auth plugin: password
Using parameters {'username': 'admin', 'project_name': 'admin', 'auth_url': 'http://controller:35357/v3', 'user_domain_name': 'default', 'password': '***', 'project_domain_name': 'default'}
Get auth_ref
REQ: curl -g -i -X GET http://controller:35357/v3 -H "Accept: application/json" -H "User-Agent: python-openstackclient keystoneauth1/2.4.0 python-requests/2.9.1 CPython/2.7.6"
Starting new HTTP connection (1): controller
"GET /v3 HTTP/1.1" 200 250
RESP: [200] Content-Length: 250 Vary: X-Auth-Token Keep-Alive: timeout=5, max=100 Server: Apache/2.4.7 (Ubuntu) Connection: Keep-Alive Date: Sat, 07 May 2016 22:23:59 GMT x-openstack-request-id: req-8079c651-1fad-4afc-9579-c0369ef107ff Content-Type: application/json X-Distribution: Ubuntu
RESP BODY: {"version": {"status": "stable", "updated": "2016-04-04T00:00:00Z", "media-types": [{"base": "application/json", "type": "application/vnd.openstack.identity-v3+json"}], "id": "v3.6", "links": [{"href": "http://controller:35357/v3/", "rel": "self"}]}}

Making authentication request to http://controller:35357/v3/auth/tokens
"POST /v3/auth/tokens HTTP/1.1" 201 2838
get_parser(openstack network list)
common parser: ArgumentParser(prog='openstack network list', usage=None, description='List networks', version=None, formatter_class=<class 'argparse.HelpFormatter'>, conflict_handler='error', add_help=True)
Network endpoint in service catalog
run(Namespace(columns=[], external=False, formatter='table', long=False, max_width=0, noindent=False, quote_mode='nonnumeric'))
Network endpoint in service catalog
Connection: <openstack.connection.Connection object at 0x7f1dfcde79d0>
Network client initialized using OpenStack SDK: <openstack.network.v2._proxy.Proxy object at 0x7f1df391b050>
Making authentication request to http://controller:35357/v3/auth/tokens
Starting new HTTP connection (1): controller
"POST /v3/auth/tokens HTTP/1.1" 201 2838
REQ: curl -g -i -X GET http://controller:9696/v2.0/networks -H "User-Agent: openstacksdk/0.8.1 keystoneauth1/2.4.0 python-requests/2.9.1 CPython/2.7.6" -H "Accept: application/json" -H "X-Auth-Token: {SHA1}068028b5466fdf62d975cc9063ca42d71c67ee18"
Starting new HTTP connection (1): controller
"GET /v2.0/networks HTTP/1.1" 503 100
RESP: [503] Date: Sat, 07 May 2016 22:23:59 GMT Connection: keep-alive Content-Type: text/plain; charset=UTF-8 Content-Length: 100 X-Openstack-Request-Id: req-68832f65-98a3-4450-9fcf-2846a3a64c82
RESP BODY: 503 Service Unavailable

The server is currently unavailable. Please try again at a later time.



Request returned failure status: 503
HttpException: Service Unavailable, 503 Service Unavailable

The server is currently unavailable. Please try again at a later time.


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 93, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/lib/python2.7/dist-packages/cliff/lister.py", line 56, in produce_output
    parsed_args,
  File "/usr/lib/python2.7/dist-packages/cliff/formatters/table.py", line 45, in emit_list
    first_row = next(data_iter)
  File "/usr/lib/python2.7/dist-packages/openstackclient/network/v2/network.py", line 260, in <genexpr>
    (utils.get_item_properties(
  File "/usr/lib/python2.7/dist-packages/openstack/resource.py", line 878, in list
    headers=headers, params=params)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 564, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/openstack/session.py", line 63, in map_exceptions_wrapper
    http_status=e.http_status, cause=e)
HttpException: HttpException: Service Unavailable, 503 Service Unavailable

The server is currently unavailable. Please try again at a later time.


clean_up ListNetwork: HttpException: Service Unavailable, 503 Service Unavailable

The server is currently unavailable. Please try again at a later time.


Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 118, in run
    ret_val = super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 255, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/dist-packages/openstackclient/shell.py", line 153, in run_subcommand
    ret_value = super(OpenStackShell, self).run_subcommand(argv)
  File "/usr/lib/python2.7/dist-packages/cliff/app.py", line 374, in run_subcommand
    result = cmd.run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/openstackclient/common/command.py", line 38, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python2.7/dist-packages/cliff/display.py", line 93, in run
    self.produce_output(parsed_args, column_names, data)
  File "/usr/lib/python2.7/dist-packages/cliff/lister.py", line 56, in produce_output
    parsed_args,
  File "/usr/lib/python2.7/dist-packages/cliff/formatters/table.py", line 45, in emit_list
    first_row = next(data_iter)
  File "/usr/lib/python2.7/dist-packages/openstackclient/network/v2/network.py", line 260, in <genexpr>
    (utils.get_item_properties(
  File "/usr/lib/python2.7/dist-packages/openstack/resource.py", line 878, in list
    headers=headers, params=params)
  File "/usr/lib/python2.7/dist-packages/keystoneauth1/session.py", line 564, in get
    return self.request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/openstack/session.py", line 63, in map_exceptions_wrapper
    http_status=e.http_status, cause=e)
HttpException: HttpException: Service Unavailable, 503 Service Unavailable

The server is currently unavailable. Please try again at a later time.



END return value: 1



neutron-server.log

2016-05-07 19:18:53.716 2176 ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400
2016-05-07 19:18:53.717 2176 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Expecting to find id or name in user - the server coul$
2016-05-07 19:18:53.718 2176 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Failed to fetch token data from identity server
2016-05-07 19:18:53.720 2176 INFO neutron.wsgi [-] 172.16.0.10 - - [07/May/2016 19:18:53] "GET /v2.0/networks HTTP/1.1" 503 325 0.027239
2016-05-07 19:19:11.302 2175 ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400
2016-05-07 19:19:11.303 2175 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Expecting to find id or name in user - the server coul$
2016-05-07 19:19:11.303 2175 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Failed to fetch token data from identity server
2016-05-07 19:19:11.311 2175 INFO neutron.wsgi [-] 172.16.0.10 - - [07/May/2016 19:19:11] "GET /v2.0/networks HTTP/1.1" 503 325 0.028922
2016-05-07 19:23:44.473 2175 ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400
2016-05-07 19:23:44.473 2175 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Expecting to find id or name in user - the server coul$
2016-05-07 19:23:44.474 2175 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Failed to fetch token data from identity server
2016-05-07 19:23:44.478 2175 INFO neutron.wsgi [-] 172.16.0.10 - - [07/May/2016 19:23:44] "GET /v2.0/networks HTTP/1.1" 503 325 0.023012
2016-05-07 19:23:59.615 2176 ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400
2016-05-07 19:23:59.616 2176 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Expecting to find id or name in user - the server coul$
2016-05-07 19:23:59.617 2176 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Failed to fetch token data from identity server
2016-05-07 19:23:59.622 2176 INFO neutron.wsgi [-] 172.16.0.10 - - [07/May/2016 19:23:59] "GET /v2.0/networks HTTP/1.1" 503 325 0.053815