OpenStack

<class ‘nova.exception.NeutronAdminCredentialConfigurationInvalid’> (HTTP 500)

Bug 详情

出现Bug的操作

Openstack在创建实例时出现该BUG

  • 通过网页创建:
    在这里插入图片描述

  • 通过命令行创建:
    在这里插入图片描述

日志记录

neutron

/var/log/neutron/server.log

2021-12-22 17:01:28.948 3651 INFO neutron.wsgi [req-aa7513db-bcdf-4e10-af2d-001d37ac17a9 61e5a19545e747a685a058753c8ffabf fef6bcb50be441d5b4459be8fbae9b90 - 1e71d2796aca4443a46850ed14f8f11b 1e71d2796aca4443a46850ed14f8f11b] 192.168.230.131 "GET /v2.0/networks/dbdeb6a2-e483-4f6c-904d-20180520636d HTTP/1.1" status: 200  len: 888 time: 0.3682239
2021-12-22 17:01:28.970 3651 INFO neutron.api.v2.resource [req-78484163-cb7f-4f84-b889-01baa173f524 61e5a19545e747a685a058753c8ffabf fef6bcb50be441d5b4459be8fbae9b90 - 1e71d2796aca4443a46850ed14f8f11b 1e71d2796aca4443a46850ed14f8f11b] show failed (client error): The resource could not be found.
2021-12-22 17:01:28.971 3651 INFO neutron.wsgi [req-78484163-cb7f-4f84-b889-01baa173f524 61e5a19545e747a685a058753c8ffabf fef6bcb50be441d5b4459be8fbae9b90 - 1e71d2796aca4443a46850ed14f8f11b 1e71d2796aca4443a46850ed14f8f11b] 192.168.230.131 "GET /v2.0/security-groups/mysg HTTP/1.1" status: 404  len: 328 time: 0.0146201
2021-12-22 17:01:29.017 3651 INFO neutron.wsgi [req-4f29d67d-9cc1-4b0f-bac7-a7c205104f46 61e5a19545e747a685a058753c8ffabf fef6bcb50be441d5b4459be8fbae9b90 - 1e71d2796aca4443a46850ed14f8f11b 1e71d2796aca4443a46850ed14f8f11b] 192.168.230.131 "GET /v2.0/security-groups?name=mysg HTTP/1.1" status: 200  len: 2554 time: 0.0437040
2021-12-22 17:01:29.081 3651 INFO neutron.wsgi [-] 192.168.230.131 "GET /v2.0/security-groups?fields=id&id=081014f7-8abb-43cc-b240-e81ab6feab68 HTTP/1.1" status: 401  len: 380 time: 0.0014911
2021-12-22 17:01:29.086 3651 INFO neutron.wsgi [-] 192.168.230.131 "GET /v2.0/security-groups?fields=id&id=081014f7-8abb-43cc-b240-e81ab6feab68 HTTP/1.1" status: 401  len: 380 time: 0.0011950
nova

/var/log/nova/nova-api.log

2021-12-22 17:15:07.868 4564 ERROR nova.network.neutronv2.api [req-54f0ac40-ce99-414d-83f0-92f53d27c1cd f248b5069fba4236a41292c1fd917390 3a89d3b9e1494c2fafeae63784802d3b - 1e71d2796aca4443a46850ed14f8f11b 1e71d2796aca4443a46850ed14f8f11b] Neutron client was not able to generate a valid admin token, please verify Neutron admin credential located in nova.conf: Unauthorized: 401-{u'error': {u'message': u'The request you have made requires authentication.', u'code': 401, u'title': u'Unauthorized'}}
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi [req-54f0ac40-ce99-414d-83f0-92f53d27c1cd f248b5069fba4236a41292c1fd917390 3a89d3b9e1494c2fafeae63784802d3b - 1e71d2796aca4443a46850ed14f8f11b 1e71d2796aca4443a46850ed14f8f11b] Unexpected exception in API method: NeutronAdminCredentialConfigurationInvalid: Networking client is experiencing an unauthorized exception.
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi Traceback (most recent call last):
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/openstack/wsgi.py", line 671, in wrapped
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return f(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/validation/__init__.py", line 110, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     return func(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/api/openstack/compute/servers.py", line 687, in create
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     **create_kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/hooks.py", line 154, in inner
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     rv = f(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1883, in create
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     supports_port_resource_request=supports_port_resource_request)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 1303, in _create_instance
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     reservation_id, max_count, supports_port_resource_request)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 889, in _validate_and_build_base_options
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     self._check_requested_secgroups(context, security_groups))
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/compute/api.py", line 389, in _check_requested_secgroups
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     secgroup_dict = self.security_group_api.get(context, secgroup)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/security_group/neutron_driver.py", line 143, in get
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     neutron, 'security_group', name, context.project_id)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 61, in find_resourceid_by_name_or_id
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     parent_id, fields='id')['id']
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/neutron/v2_0/__init__.py", line 53, in find_resource_by_name_or_id
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     cmd_resource, parent_id, fields)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 129, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 474, in find_resource
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     cmd_resource, parent_id, fields)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 129, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 430, in find_resource_by_id
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     data = obj_lister(**params)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 129, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 985, in list_security_groups
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     retrieve_all, **_params)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 129, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 369, in list
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     for r in self._pagination(collection, path, **params):
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 384, in _pagination
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     res = self.get(path, params=params)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 129, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 354, in get
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     headers=headers, params=params)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 129, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 331, in retry_request
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     headers=headers, params=params)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 129, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     ret = obj(*args, **kwargs)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/neutronclient/v2_0/client.py", line 294, in do_request
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     self._handle_fault_response(status_code, replybody, resp)
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi   File "/usr/lib/python2.7/site-packages/nova/network/neutronv2/api.py", line 145, in wrapper
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi     raise exception.NeutronAdminCredentialConfigurationInvalid()
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi NeutronAdminCredentialConfigurationInvalid: Networking client is experiencing an unauthorized exception.
2021-12-22 17:15:07.869 4564 ERROR nova.api.openstack.wsgi
2021-12-22 17:15:07.888 4564 INFO nova.api.openstack.wsgi [req-54f0ac40-ce99-414d-83f0-92f53d27c1cd f248b5069fba4236a41292c1fd917390 3a89d3b9e1494c2fafeae63784802d3b - 1e71d2796aca4443a46850ed14f8f11b 1e71d2796aca4443a46850ed14f8f11b] HTTP exception thrown: 发生意外 API 错误。请在 http://bugs.launchpad.net/nova/ 处报告此错误,并且附
上 Nova API 日志(如果可能)。
<class 'nova.exception.NeutronAdminCredentialConfigurationInvalid'>

解决方法请添加图片描述

这里找到了解决方法:

即:将neutronnova配置文件中[keystone_authtoken]部分的service_token_roles_required设为false

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值