分享

glance上传镜像提示Invalid OpenStack Identity credentials.

ZHOU_GONG 发表于 2016-12-20 21:59:45 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 8 10515
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=admin
export OS_AUTH_URL=http://controller:35357/v2.0

[root@controller ~]# tail /var/log/glance/api.log
2016-12-20 08:34:01.174 11445 INFO eventlet.wsgi.server [-] 192.168.199.10 - - [20/Dec/2016 08:34:01] "POST /v1/images HTTP/1.1" 401 571 0.617591
2016-12-20 08:47:51.173 991 INFO glance.common.wsgi [-] Starting 2 workers
2016-12-20 08:47:51.183 991 INFO glance.common.wsgi [-] Started child 2529
2016-12-20 08:47:51.186 2529 INFO eventlet.wsgi.server [-] (2529) wsgi starting up on http://0.0.0.0:9292
2016-12-20 08:47:51.191 991 INFO glance.common.wsgi [-] Started child 2530
2016-12-20 08:47:51.195 2530 INFO eventlet.wsgi.server [-] (2530) wsgi starting up on http://0.0.0.0:9292
2016-12-20 08:58:16.596 2529 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2016-12-20 08:58:16.684 2529 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}
2016-12-20 08:58:16.685 2529 WARNING keystonemiddleware.auth_token [-] Authorization failed for token
2016-12-20 08:58:16.688 2529 INFO eventlet.wsgi.server [-] 192.168.199.10 - - [20/Dec/2016 08:58:16] "GET /v1/images/detail?sort_key=name&sort_dir=asc&limit=20 HTTP/1.1" 401 571 0.261640


[keystone_authtoken]

auth_uri=http://controller:5000/v2.0

identity_uri = http://controller:35357

admin_tenant_name = service

admin_user = glance

admin_password = glance


已有(10)人评论

跳转到指定楼层
ZHOU_GONG 发表于 2016-12-20 22:03:04
[root@controller ~]# keystone endpoint-list
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:65: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
+----------------------------------+-----------+-----------------------------+-----------------------------+------------------------------+----------------------------------+
|                id                |   region  |          publicurl          |         internalurl         |           adminurl           |            service_id            |
+----------------------------------+-----------+-----------------------------+-----------------------------+------------------------------+----------------------------------+
| bf1ced38d670465d9b5822abfe9261ce | regionOne |    http://controller:9292   |    http://controller:9292   |    http://controller:9292    | d87c922b349c4c0a8e7755a7ca44e18c |
| c90c781a6f654a8bad5d81770dba5411 | regionOne | http://controller:5000/v2.0 | http://controller:5000/v2.0 | http://controller:35357/v2.0 | 632979a013b041b18e3ba849337931f1 |
+----------------------------------+-----------+-----------------------------+-----------------------------+------------------------------+----------------------------------+
回复

使用道具 举报

qcbb001 发表于 2016-12-21 09:21:56
ZHOU_GONG 发表于 2016-12-20 22:03
[root@controller ~]# keystone endpoint-list
/usr/lib/python2.7/site-packages/keystoneclient/shell.p ...

keystone各个服务是否正常,都列出来看下
回复

使用道具 举报

ZHOU_GONG 发表于 2016-12-21 14:19:52
qcbb001 发表于 2016-12-21 09:21
keystone各个服务是否正常,都列出来看下

[root@controller ~]# keystone service-list
+----------------------------------+----------+----------+-------------------------+
|                id                |   name   |   type   |       description       |
+----------------------------------+----------+----------+-------------------------+
| d87c922b349c4c0a8e7755a7ca44e18c |  glance  |  image   | OpenStack Image Service |
| 632979a013b041b18e3ba849337931f1 | keystone | identity |    OpenStack Identity   |
| 2562ad306df34d2094bf740486cff0a2 |   nova   | compute  |    OpenStack Compute    |
+----------------------------------+----------+----------+-------------------------+

回复

使用道具 举报

ZHOU_GONG 发表于 2016-12-21 14:23:36
qcbb001 发表于 2016-12-21 09:21
keystone各个服务是否正常,都列出来看下

[root@controller ~]# keystone service-list
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:65: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
+----------------------------------+----------+----------+-------------------------+
|                id                |   name   |   type   |       description       |
+----------------------------------+----------+----------+-------------------------+
| d87c922b349c4c0a8e7755a7ca44e18c |  glance  |  image   | OpenStack Image Service |
| 632979a013b041b18e3ba849337931f1 | keystone | identity |    OpenStack Identity   |
| 2562ad306df34d2094bf740486cff0a2 |   nova   | compute  |    OpenStack Compute    |
+----------------------------------+----------+----------+-------------------------+
[root@controller ~]# keystone service-get d87c922b349c4c0a8e7755a7ca44e18c
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:65: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |     OpenStack Image Service      |
|   enabled   |               True               |
|      id     | d87c922b349c4c0a8e7755a7ca44e18c |
|     name    |              glance              |
|     type    |              image               |
+-------------+----------------------------------+
[root@controller ~]# keystone service-get 632979a013b041b18e3ba849337931f1
/usr/lib/python2.7/site-packages/keystoneclient/shell.py:65: DeprecationWarning: The keystone CLI is deprecated in favor of python-openstackclient. For a Python library, continue using python-keystoneclient.
  'python-keystoneclient.', DeprecationWarning)
+-------------+----------------------------------+
|   Property  |              Value               |
+-------------+----------------------------------+
| description |        OpenStack Identity        |
|   enabled   |               True               |
|      id     | 632979a013b041b18e3ba849337931f1 |
|     name    |             keystone             |
|     type    |             identity             |
+-------------+----------------------------------+

回复

使用道具 举报

einhep 发表于 2016-12-21 16:11:46
ZHOU_GONG 发表于 2016-12-21 14:23
[root@controller ~]# keystone service-list
/usr/lib/python2.7/site-packages/keystoneclient/shell. ...

keystoneclient有问题,先解决掉这个。在往后面看

Ubuntu的使用这个命令:
[mw_shl_code=bash,true] apt-get install keystone python-keystoneclient
[/mw_shl_code]
来自:
openstack【juno】入门 【keystone篇】五::Keystone部署及介绍
http://www.aboutyun.com/forum.php?mod=viewthread&tid=11404


这些事最基础的,忽略了就会产生各种问题
回复

使用道具 举报

ZHOU_GONG 发表于 2016-12-21 16:37:58
einhep 发表于 2016-12-21 16:11
keystoneclient有问题,先解决掉这个。在往后面看

Ubuntu的使用这个命令:

[root@controller ~]# yum install keystone python-keystoneclient
Loaded plugins: fastestmirror, priorities
base                                                                                                        | 3.6 kB  00:00:00     
epel/x86_64/metalink                                                                                        | 5.3 kB  00:00:00     
epel                                                                                                        | 4.3 kB  00:00:00     
extras                                                                                                      | 3.4 kB  00:00:00     
openstack-kilo                                                                                              | 2.9 kB  00:00:00     
updates                                                                                                     | 3.4 kB  00:00:00     
(1/2): epel/x86_64/updateinfo                                                                               | 691 kB  00:00:00     
(2/2): epel/x86_64/primary_db                                                                               | 4.4 MB  00:00:06     
Loading mirror speeds from cached hostfile
* base: centos.ustc.edu.cn
* epel: mirror01.idc.hinet.net
* extras: centos.ustc.edu.cn
* updates: centos.ustc.edu.cn
No package keystone available.
Package 1:python-keystoneclient-1.3.0-1.el7.noarch already installed and latest version
Nothing to do

keystone已经安装完了,我是照着文档来做的

点评

Juno版本有点老了,个人认为不是升级,而是降级  发表于 2016-12-21 18:02
回复

使用道具 举报

ZHOU_GONG 发表于 2016-12-21 20:44:05
einhep 发表于 2016-12-21 18:13
[root@controller ~]# yum install keystone python-keystoneclient
Loaded plugins: fastestmirror, pr ...

那我要怎么做?

点评

找到Juno对应的版本  发表于 2016-12-21 21:55
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条