string2020 发表于 2014-2-20 23:59:31

howtodown 发表于 2014-2-21 02:26:28

你可以参考这个配置
http://docs.openstack.org/trunk/install-guide/install/apt/content/nova-controller.html

在 /etc/nova/nova.conf添加下面试一下。

auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = NOVA_PASS然后确保下面的服务都安装了


apt-get install nova-novncproxy novnc nova-api \
nova-ajax-console-proxy nova-cert nova-conductor \
nova-consoleauth nova-doc nova-scheduler \
python-novaclient使用
netstat -an确保监听正确的端口

chown -R nova:nova on /etc/nova
确保 nova services都运行






string2020 发表于 2014-2-21 09:12:51

string2020 发表于 2014-2-21 09:24:07

wonitazansa 发表于 2015-3-18 17:31:26

我也遇到这个问题,用你的方法解决了
但是
我看了许多文档,都是安装没改之前的用户名和密码,这里会不会只是表象呀
这里改成admin,会不会其他地方有问题

pig2 发表于 2015-3-18 18:13:53

wonitazansa 发表于 2015-3-18 17:31
我也遇到这个问题,用你的方法解决了
但是
我看了许多文档,都是安装没改之前的用户名和密码,这里会不会 ...

可以尝试验证其它租户登录

jixianqiuxue 发表于 2015-3-18 18:22:45

wonitazansa 发表于 2015-3-18 17:31
我也遇到这个问题,用你的方法解决了
但是
我看了许多文档,都是安装没改之前的用户名和密码,这里会不会 ...



把你的配置改成这样在尝试下,你的可能缺少identity_uri = http://controller:35357


auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357
admin_tenant_name = service
admin_user = nova
admin_password = NOVA_PASS

wonitazansa 发表于 2015-3-19 09:47:04

root@controller ~]# vi /etc/nova/nova.conf
……

auth_uri = http://controller:5000
auth_host = controller
auth_protocol = http
auth_port = 35357
identity_uri = http://controller:35357
admin_user = nova
admin_tenant_name = service
admin_password = NOVA_PASS

安装上面设置后
tail /var/log/nova/api.log
2015-03-19 09:33:37.514 570 WARNING keystoneclient.middleware.auth_token [-] Unexpected response from keystone service: {u'error': {u'message': u'The resource could not be found.', u'code': 404, u'title': u'Not Found'}}
2015-03-19 09:33:37.515 570 WARNING keystoneclient.middleware.auth_token [-] Authorization failed for token
2015-03-19 09:33:37.519 563 WARNING keystoneclient.middleware.auth_token [-] Unable to find authentication token in headers


# nova --debug list
......
REQ: curl -i 'http://controller:8774/v2/9b807b0dd7de4bba87c3e4704d9fa5e9/servers/detail' -X GET -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Accept: application/json" -H "X-Auth-Token: e0b3b0758a854bdc853cad4469cc31ce"

INFO (connectionpool:203) Starting new HTTP connection (1): controller
DEBUG (connectionpool:295) "GET /v2/9b807b0dd7de4bba87c3e4704d9fa5e9/servers/detail HTTP/1.1" 401 23
RESP: {'date': 'Thu, 19 Mar 2015 01:36:43 GMT', 'content-length': '23', 'content-type': 'text/plain', 'www-authenticate': "Keystone uri='http://controller:5000'"}
RESP BODY: Authentication required

DEBUG (shell:783) Unauthorized (HTTP 401)
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 780, in main
    OpenStackComputeShell().main(map(strutils.safe_decode, sys.argv))
File "/usr/lib/python2.6/site-packages/novaclient/shell.py", line 716, in main
    args.func(self.cs, args)
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/shell.py", line 1138, in do_list
    search_opts=search_opts)
File "/usr/lib/python2.6/site-packages/novaclient/v1_1/servers.py", line 583, in list
    return self._list("/servers%s%s" % (detail, query_string), "servers")
File "/usr/lib/python2.6/site-packages/novaclient/base.py", line 64, in _list
    _resp, body = self.api.client.get(url)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 309, in get
    return self._cs_request(url, 'GET', **kwargs)
File "/usr/lib/python2.6/site-packages/novaclient/client.py", line 301, in _cs_request
    raise e
Unauthorized: Unauthorized (HTTP 401)
ERROR: Unauthorized (HTTP 401)


为什么这个nova这个用户不行呀,是不是过期了,如何检查这个用户
大家帮帮忙,自己是新手,实在着急
页: [1]
查看完整版本: nova image-list报错:ERROR: Unauthorized (HTTP 401)