openstack glance连接认证keystone出现错误的一个解决思路

搭建好了keystone服务后,对自己本身的认证是成功的 说明keystone配置是正确的。


之后开始配置glance服务,配置好了,出现了如下报错。


[ root@linux-node1 ~]# glance  image-list

503 Service Unavailable: The server is currently unavailable. Please try again at a later time. (HTTP 503)


开始以为是环境变量设置的问题。然后如下操作:


echo"export OS_IMAGE_API_VERSION=2"|tee-a admin-openrc.sh demo-openrc.sh


source admin-openrc.sh


然后执行 glance image-list


还是出现上面的这个报错。



然后我就看了下日志,出现了如下报错:


 4-21 09:44:12.712 29975 ERROR keystonemiddleware.auth_token [-] Bad response code while validating token: 400
2017-04-21 09:44:12.714 29975 WARNING keystonemiddleware.auth_token [-] Identity response: {"error": {"message": "Expecting to find domain in user - the server could not comply with the request since it is either malformed or otherwise incorrect. The client is assumed to be in error.", "code": 400, "title": "Bad Request"}}
2017-04-21 09:44:12.716 29975 CRITICAL keystonemiddleware.auth_token [-] Unable to validate token: Failed to fetch token data from identity server
2017-04-21 09:44:12.720 29975 INFO eventlet.wsgi.server [-] 10.20.23.232 - - [21/Apr/2017 09:44:12] "GET /v2/images?limit=20&sort_key=name&sort_dir=asc HTTP/1.1" 503 370 0.091461



意思貌似是glance认证keystone出现了问题。 Unable to validate token: Failed to fetch token data from identity server
之后比对了下/etc/glance/glance-registry.conf 和 /etc/glance/glance-api.conf 文件
发现了 /etc/glance/glance-api.conf 文件缺少了
user_domain_id = default
project_name = service
导致glance链接keystone失败。所以添加了.
重启下服务:
[root@linux-node1 ~]#  systemctl restart openstack-glance-api
[root@linux-node1 ~]# systemctl restart openstack-glance-registry
最后就是见证奇迹的时刻。。
[root@linux-node1 ~]# glance  image-list
+----+------+
| ID | Name |
+----+------+
+----+------+
这只是一个思路,openstack这个虚拟化操作是非常繁琐的 ,所以部署的过程中要注意些配置文件。不然出了错误 都不知道怎么去解决。


  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值