1

我输入“nova image-list”后收到错误消息:“Unauthorized (HTTP 401)”,有人知道这个问题吗?非常感谢!

这是我的配置:

版本:havana 参考:openstack-install-guide-apt-havana.pdf(官网)

/etc/nova/nova.conf

[DEFAULT]
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
force_dhcp_release=True
iscsi_helper=tgtadm
libvirt_use_virtio_for_bridges=True
connection_type=libvirt
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
verbose=True
ec2_private_dns_show_ip=True
api_paste_config=/etc/nova/api-paste.ini
volumes_path=/var/lib/nova/volumes
enabled_apis=ec2,osapi_compute,metadata
auth_strategy = keystone
rpc_backend = nova.rpc.impl_kombu
rabbit_host = controller
debug=True
[database]
# The SQLAlchemy connection string used to connect to the database
connection = mysql://nova:NOVA_DBPASS@controller/nova

my_ip=192.168.0.10
vncserver_listen=192.168.0.10
vncserver_proxyclient_address=192.168.0.10

nova --debug 图像列表

REQ: curl -i http://controller:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "ADMIN_PASS"}}}'

INFO (connectionpool:202) Starting new HTTP connection (1): controller
DEBUG (connectionpool:296) "POST /v2.0/tokens HTTP/1.1" 200 3822
RESP: [200] CaseInsensitiveDict({'date': 'Sat, 02 Nov 2013 02:50:07 GMT', 'vary': 'X-Auth-Token', 'content-length': '3822', 'content-type': 'application/json'})
RESP BODY: {"access": {"token": {"issued_at": "2013-11-02T02:50:07.595083", "expires": "2013-11-03T02:50:07Z", "id": "MIIHJgYJKoZIhvcNAQcCoIIHFzCCBxMCAQExCTAHBgUrDgMCGjCCBXwGCSqGSIb3DQEHAaCCBW0EggVpeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMS0wMlQwM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rBEM9Jfq4GR1YE1I9kRqWu895FOruREn7i2rAIuEQ-biYlorgXT1a9eI3qxk8rR9cNhzhuAwZk7miXqInIhb5DWcQk6Nfk+Lz3xqZucFDz-SUPv7VdXMUGurr+1AzlXPxYaPYW2TJAq6jUHM8HKeQ==", "tenant": {"description": "Admin Tenant", "enabled": true, "id": "0f870819e37b45d784affdaad7382170", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://controller:9292", "region": "regionOne", "internalURL": "http://controller:9292", "id": "19e7297eb82d4cd5ad47ea556321d51c", "publicURL": "http://controller:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://controller:8774/v2/0f870819e37b45d784affdaad7382170", "region": "regionOne", "internalURL": "http://controller:8774/v2/0f870819e37b45d784affdaad7382170", "id": "0c938b7e120f48d8a4c86913d0d4707a", "publicURL": "http://controller:8774/v2/0f870819e37b45d784affdaad7382170"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://controller:35357/v2.0", "region": "regionOne", "internalURL": "http://controller:5000/v2.0", "id": "61ff07c1ca8944d8a58da51452de79f5", "publicURL": "http://controller:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "838acae51c454ffab32956160d996759", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["14047088fa844d09b9ef15f7604e7e30"]}}}


REQ: curl -i http://controller:8774/v2/0f870819e37b45d784affdaad7382170/images/detail -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: MIIHJgYJKoZIhvcNAQcCoIIHFzCCBxMCAQExCTAHBgUrDgMCGjCCBXwGCSqGSIb3DQEHAaCCBW0EggVpeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMS0wMlQwMjo1MDowNy41OTUwODMiLCAiZXhwaX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ruREn7i2rAIuEQ-biYlorgXT1a9eI3qxk8rR9cNhzhuAwZk7miXqInIhb5DWcQk6Nfk+Lz3xqZucFDz-SUPv7VdXMUGurr+1AzlXPxYaPYW2TJAq6jUHM8HKeQ=="

INFO (connectionpool:202) Starting new HTTP connection (1): controller
DEBUG (connectionpool:296) "GET /v2/0f870819e37b45d784affdaad7382170/images/detail HTTP/1.1" 401 23
RESP: [401] CaseInsensitiveDict({'date': 'Sat, 02 Nov 2013 02:50:11 GMT', 'content-length': '23', 'content-type': 'text/plain', 'www-authenticate': "Keystone uri='http://controller:5000'"})
RESP BODY: Authentication required


REQ: curl -i http://controller:35357/v2.0/tokens -X POST -H "Content-Type: application/json" -H "Accept: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"passwordCredentials": {"username": "admin", "password": "ADMIN_PASS"}, "tenantId": "0f870819e37b45d784affdaad7382170"}}'

DEBUG (connectionpool:296) "POST /v2.0/tokens HTTP/1.1" 200 3822
RESP: [200] CaseInsensitiveDict({'date': 'Sat, 02 Nov 2013 02:50:11 GMT', 'vary': 'X-Auth-Token', 'content-length': '3822', 'content-type': 'application/json'})
RESP BODY: {"access": {"token": {"issued_at": "2013-11-02T02:50:11.280470", "expires": "2013-11-03T02:50:11Z", "id": "MIIHJgYJKoZIhvcNAQcCoIIHFzCCBxMCAQExCTAHBgUrDgMCGjCCBXwGCSqGSIb3DQEHAaCCBW0EggVpeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMS0wMlQwMjo1MDoxMS4yODA0NzAiLCAiZXhwaXJlcyI6ICIyMDEzLTExLTAzVDAyOjUwOjExWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIkFkbWluIFRlbmFudCIsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogIjBmODcwODE5ZTM3YjQ1ZDc4NGFmZmRhYWQ3MzgyMTcwIiwgIm5hbWUiOiA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hNThkYTUxNDUyZGU3OWY1IiwgInB1YmxpY1VSTCI6ICJodHRwOi8vY29udHJvbGxlcjo1MDAwL3YyLjAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICI4MzhhY2FlNTFjNDU0ZmZhYjMyOTU2MTYwZDk5Njc1OSIsICJyb2xlcyI6IFt7Im5hbWUiOiAiYWRtaW4ifV0sICJuYW1lIjogImFkbWluIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbIjE0MDQ3MDg4ZmE4NDRkMDliOWVmMTVmNzYwNGU3ZTMwIl19fX0xggGBMIIBfQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwBwYFKw4DAhowDQYJKoZIhvcNAQEBBQAEggEAY9Nj3QqPPS-2eniw2jGADLS2TT09Ig3TmkzBpTNyIsk907CZvAmIoj0O6bnnz3uJ+DkAiXCAy8G1iTVYhIlXoSdfPgx-eZVs+JyBpV0baSvBQijKzar4M9bWyXVdMAeod5qpPfCBnUfjHe4dDB8H+aGx5tGI0aFlyJvLGlvGPZrxAl4oAD+GtCqbL+fEIF-hAOrdITJ8-h3HR2tBiUUIz5hvbc+DWvNi4DbQyjzz+3ahXgKUQKyXz-n8sbQe2cIA5y2MalOIZ0yiKOUuMIr7NY2fzAviXnlyApyvqEt7wd58uopT+W85aJGa6viFEbvCTZXJRonulKEfs4ZlrUeXuA==", "tenant": {"description": "Admin Tenant", "enabled": true, "id": "0f870819e37b45d784affdaad7382170", "name": "admin"}}, "serviceCatalog": [{"endpoints": [{"adminURL": "http://controller:9292", "region": "regionOne", "internalURL": "http://controller:9292", "id": "19e7297eb82d4cd5ad47ea556321d51c", "publicURL": "http://controller:9292"}], "endpoints_links": [], "type": "image", "name": "glance"}, {"endpoints": [{"adminURL": "http://controller:8774/v2/0f870819e37b45d784affdaad7382170", "region": "regionOne", "internalURL": "http://controller:8774/v2/0f870819e37b45d784affdaad7382170", "id": "0c938b7e120f48d8a4c86913d0d4707a", "publicURL": "http://controller:8774/v2/0f870819e37b45d784affdaad7382170"}], "endpoints_links": [], "type": "compute", "name": "nova"}, {"endpoints": [{"adminURL": "http://controller:35357/v2.0", "region": "regionOne", "internalURL": "http://controller:5000/v2.0", "id": "61ff07c1ca8944d8a58da51452de79f5", "publicURL": "http://controller:5000/v2.0"}], "endpoints_links": [], "type": "identity", "name": "keystone"}], "user": {"username": "admin", "roles_links": [], "id": "838acae51c454ffab32956160d996759", "roles": [{"name": "admin"}], "name": "admin"}, "metadata": {"is_admin": 0, "roles": ["14047088fa844d09b9ef15f7604e7e30"]}}}


REQ: curl -i http://controller:8774/v2/0f870819e37b45d784affdaad7382170/images/detail -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: MIIHJgYJKoZIhvcNAQcCoIIHFzCCBxMCAQExCTAHBgUrDgMCGjCCBXwGCSqGSIb3DQEHAaCCBW0EggVpeyJhY2Nlc3MiOiB7InRva2VuIjogeyJpc3N1ZWRfYXQiOiAiMjAxMy0xMS0wMlQwMjo1MDoxMS4yODA0NzAiLCAiZXhwaXJlcyI6ICIyMDEzLTExLTAzVDAyOjUwOjExWiIsICJpZCI6ICJwbGFjZWhvbGRlciIsICJ0ZW5hbnQiOiB7ImRlc2NyaXB0aW9uIjogIkFkbWluIFRlbmFudCIsICJlbmFibGVkIjogdHJ1ZSwgImlkIjogIjBmODcwODE5ZTM3YjQ1ZDc4NGFmZmRhYWQ3MzgyMTcwIiwgIm5hbWUiOiAiYWRtaW4ifX0sICJzZXJ2aWN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InB1YmxpY1VSTCI6ICJodHRwOi8vY29udHJvbGxlcjo1MDAwL3YyLjAifV0sICJlbmRwb2ludHNfbGlua3MiOiBbXSwgInR5cGUiOiAiaWRlbnRpdHkiLCAibmFtZSI6ICJrZXlzdG9uZSJ9XSwgInVzZXIiOiB7InVzZXJuYW1lIjogImFkbWluIiwgInJvbGVzX2xpbmtzIjogW10sICJpZCI6ICI4MzhhY2FlNTFjNDU0ZmZhYjMyOTU2MTYwZDk5Njc1OSIsICJyb2xlcyI6IFt7Im5hbWUiOiAiYWRtaW4ifV0sICJuYW1lIjogImFkbWluIn0sICJtZXRhZGF0YSI6IHsiaXNfYWRtaW4iOiAwLCAicm9sZXMiOiBbIjE0MDQ3MDg4ZmE4NDRkMDliOWVmMTVmNzYwNGU3ZTMwIl19fX0xggGBMIIBfQIBATBcMFcxCzAJBgNVBAYTAlVTMQ4wDAYDVQQIDAVVbnNldDEOMAwGA1UEBwwFVW5zZXQxDjAMBgNVBAoMBVVuc2V0MRgwFgYDVQQDDA93d3cuZXhhbXBsZS5jb20CAQEwBwYFKw4DAhowDQYJKoZIhvcNAQEBBQAEggEAY9Nj3QqPPS-2eniw2jGADLS2TT09Ig3TmkzBpTNyIsk907CZvAmIoj0O6bnnz3uJ+DkAiXCAy8G1iTVYhIlXoSdfPgx-eZVs+JyBpV0baSvBQijKzar4M9bWyXVdMAeod5qpPfCBnUfjHe4dDB8H+aGx5tGI0aFlyJvLGlvGPZrxAl4oAD+GtCqbL+fEIF-hAOrdITJ8-h3HR2tBiUUIz5hvbc+DWvNi4DbQyjzz+3ahXgKUQKyXz-n8sbQe2cIA5y2MalOIZ0yiKOUuMIr7NY2fzAviXnlyApyvqEt7wd58uopT+W85aJGa6viFEbvCTZXJRonulKEfs4ZlrUeXuA=="

DEBUG (connectionpool:296) "GET /v2/0f870819e37b45d784affdaad7382170/images/detail HTTP/1.1" 401 23
RESP: [401] CaseInsensitiveDict({'date': 'Sat, 02 Nov 2013 02:50:14 GMT', 'content-length': '23', 'content-type': 'text/plain', 'www-authenticate': "Keystone uri='http://controller:5000'"})
RESP BODY: Authentication required

DEBUG (shell:740) Unauthorized (HTTP 401)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 737, in main
    OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv[1:]))
  File "/usr/lib/python2.7/dist-packages/novaclient/shell.py", line 673, in main
    args.func(self.cs, args)
  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/shell.py", line 915, in do_image_list
    image_list = cs.images.list(limit=limit)
  File "/usr/lib/python2.7/dist-packages/novaclient/v1_1/images.py", line 54, in list
    return self._list('/images%s%s' % (detail, query), 'images')
  File "/usr/lib/python2.7/dist-packages/novaclient/base.py", line 61, in _list
    _resp, body = self.api.client.get(url)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 229, in get
    return self._cs_request(url, 'GET', **kwargs)
  File "/usr/lib/python2.7/dist-packages/novaclient/client.py", line 226, in _cs_request
    raise e
Unauthorized: Unauthorized (HTTP 401)
ERROR: Unauthorized (HTTP 401)
4

2 回答 2

1

刚刚在http://docs.openstack.org/trunk/install-guide/install/apt/content/nova-controller.html遵循 nova 的 openstack 安装说明遇到了同样的问题

您需要将 [keystone_authoken] 部分添加到 /etc/nova/nova.conf,类似于为图像服务 Glance 添加的部分:

[keystone_authtoken]
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = NOVA_PASS
于 2013-11-12T20:00:51.467 回答
0

确保安装了这些服务:

apt-get install nova-novncproxy novnc nova-api \
nova-ajax-console-proxy nova-cert nova-conductor \
nova-consoleauth nova-doc nova-scheduler \
python-novaclient

执行 anetstat -an以确保您的服务器正在侦听正确的端口:

chown -R nova:nova on /etc/nova

确保您的 nova 服务都在运行。

于 2014-02-07T03:50:10.057 回答