热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

OpenStack安装时遇到的问题

KeyStoneNoHandlersErrorroot@openstack-dev-r910:/home/brent/openstack#./keystone_data.shNohandlerscouldbefoundforlogger“keystoneclient.client”Unabletoauthorizeus
KeyStone NoHandlers

Error
root@openstack-dev-r910:/home/brent/openstack# ./keystone_data.sh
No handlers could be found for logger “keystoneclient.client”
Unable to authorize user
No handlers could be found for logger “keystoneclient.client”
Unable to authorize user
No handlers could be found for logger “keystoneclient.client”
Unable to authorize user

Fix:
Adjust the admin token to be the same as your script and your /etc/keystone/keystone.conf

Also make sure keystone.conf has the following.

driver = keystone.catalog.backends.templated.TemplatedCatalog
template_file = /etc/keystone/default_catalog.templates

Someone say pain in the ass?

Keystone: ValueError: you need to pass either an existing engine or a database uri

Problem:~# keystone-manage db_sync

File “/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py”, line 116, in construct_engine
raise ValueError(“you need to pass either an existing engine or a database uri”)
ValueError: you need to pass either an existing engine or a database uri

Resolution:

Check Keystone.conf

Make sure it looks like this: cOnnection= mysql://keystone:openstack@localhost:3306/keystone

Not that is for glance.registry :/  mysql_cOnnection= mysql://keystone:openstack@localhost:3306/keystone

No handlers could be found for logger “keystoneclient.client”

Problem: No handlers could be found for logger “keystoneclient.client”
Authorization Failed: Unable to communicate with identity service: ‘\xe2\x80\x9dhttp’. (HTTP 400)

Resolution: Make sure you have the following variables:

root@openstack1:~# export SERVICE_TOKEN=openstack
root@openstack1:~# export OS_TENANT_NAME=admin
root@openstack1:~# export OS_USERNAME=admin
root@openstack1:~# export OS_PASSWORD=openstack
root@openstack1:~# export OS_AUTH_URL=”http://localhost:5000/v2.0/”
root@openstack1:~# export SERVICE_ENDPOINT=http://localhost:35357/v2.0
root@openstack1:~# keystone user-list
+———————————-+———+——————?+———+
| id | enabled | email | name |
+———————————-+———+——————?+———+
| 149136826c504aaf896645ee169aec7b | True | glance@domain.com | glance |
| 6ba91505d57a44b3abff9c957d10b463 | True | nova@domain.com | nova |
| bba82931db1a4236a6af9e377ab1aebb | True | admin@domain.com | admin |
| bd36f79a3708445593200b50a32b4127 | True | quantum@domain.com | quantum |
| d49d9dda0b95496594f0d142c5f25d22 | True | demo@domain.com | demo |
| f0c159e20b244477b02ae448b8029051 | True | swift@domain.com | swift |
+———————————-+———+——————?+———+

Access denied for user ‘keystone’@'openstack1′ (using password: YES)”)

Problem:# keystone-manage db_sync

File “/usr/lib/python2.7/dist-packages/MySQLdb/connections.py”, line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
sqlalchemy.exc.OperationalError: (OperationalError) (1045, “Access denied for user ‘keystone’@'openstack1′ (using password: YES)”) None None

Make sure you keystone.conf looks like this.

[sql]
cOnnection= mysql://keystone:openstack@localhost:3306/keystone

http://blog.csdn.net/spch2008/article/details/8114369

在装openstack时,出错的可能只是一个服务模块,比如mysql,keystone,glance,nova等等,我们就需要把相应的模块卸载掉,不用重装整个系统了,这可以节省我们很多的时间,但很多人有不知道完全卸载这些模块的命令,往往保留了以前装的错误的配置文件,这就需要我们把所有的配置文件都卸载干净。

现在我给大家提供一些完全卸载的命令,我们可以写成脚本语言,可以很方便的执行:
#!/usr/bin/env bash
#删除glance
apt-get remove -y glance glance-api glance-client glance-common glance-registry python-glance
#删除nova
apt-get remove -y nova-api nova-cert nova-common nova-compute nova-compute-kvm nova-doc nova-network nova-objectstore nova-scheduler  nova-volume python-nova python-novaclient  nova-consoleauth python-novnc novnc
删除dashboard
apt-get remove -y libapache2-mod-wsgi openstack-dashboard
#删除mysql数据库
apt-get remove -y mysql-server python-mysqldb
#删除keystone
apt-get remove -y keystone python-keystone python-keystoneclient

dpkg -l |grep keystone|awk '{print $2}'|xargs dpkg -P
dpkg -l |grep glance|awk '{print $2}'|xargs dpkg -P
dpkg -l |grep nova|awk '{print $2}'|xargs dpkg -P
dpkg -l |grep mysql|awk '{print $2}'|xargs dpkg -P
dpkg -l |grep libapache2-mod-wsgi|awk '{print $2}'|xargs dpkg -P

## 删除掉mysql里相应的数据库
MYSQL_PASSWD=${MYSQL_PASSWD:-"cloud1234"}
mysql -uroot -p$MYSQL_PASSWD -e "DROP DATABASE IF EXISTS nova;"
mysql -uroot -p$MYSQL_PASSWD -e "DROP DATABASE IF EXISTS glance;"
mysql -uroot -p$MYSQL_PASSWD -e "DROP DATABASE IF EXISTS keystone;"

Error: No handlers could be found for logger "keystoneclient.client"

Hi Connect to mysql and do the following: drop database keystone; create database keystone; This will re create the keystone DB to have a fresh start. Finally, execute keystone-manage db_sync and re-execute the scripts.

ou may also use the restart|star|sto(8)p utility, e.g.类错误

提示类似于如下:

Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start squid

以下方式进行:

sudo restart squid #重启

sudo start squid #启动

sudo stop squid #停止


推荐阅读
author-avatar
若_时光倒影
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有