安装keystone执行命令su -s /bin/sh -c "keystone-manage db_sync" keystone时出错,求大神解答
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了安装keystone执行命令su -s /bin/sh -c "keystone-manage db_sync" keystone时出错,求大神解答相关的知识,希望对你有一定的参考价值。
报错信息如下:
Traceback (most recent call last):
File "/usr/bin/keystone-manage", line 51, in <module>
cli.main(argv=sys.argv, config_files=config_files)
File "/usr/lib/python2.6/site-packages/keystone/cli.py", line 189, in main
config.setup_logging()
File "/usr/lib/python2.6/site-packages/keystone/config.py", line 56, in setup_logging
log.setup('keystone')
File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 461, in setup
_setup_logging_from_conf(product_name, version)
File "/usr/lib/python2.6/site-packages/keystone/openstack/common/log.py", line 525, in _setup_logging_from_conf
filelog = logging.handlers.WatchedFileHandler(logpath)
File "/usr/lib64/python2.6/logging/handlers.py", line 377, in __init__
logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib64/python2.6/logging/__init__.py", line 827, in __init__
StreamHandler.__init__(self, self._open())
File "/usr/lib64/python2.6/logging/__init__.py", line 846, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/keystone/keystone.log'
connection = mysql://keystone:KEYSTONE_DBPASS@localhost/keystone
在该文件中增加[database]小节,加入
connection = mysql://keystone:KEYSTONE_DBPASS@controller/keystone
需要注意的是,密码部分需要一致,此处均为KEYSTONE_DBPASS
再次执行数据库同步命令,应该可以成功,请楼主试一下 参考技术A 目测是权限不够的问题啊。。 root了没??
IOError: [Errno 13] Permission denied
可以查一下Errno13,这个应该是系统的IO错误号,13号IO错误看是什么解释吧。本回答被提问者采纳
keystone同步数据库的时候提示error
keystone 在同步的时候报出以下错误:
su -s /bin/sh -c "keystone-manage db_sync" keystone
CRITICAL keystone [-] DBError: (pymysql.err.InternalError) (1071, u‘Specified key was too long; max key length is 767 bytes‘) [SQL: u‘\nCREATE TABLE migrate_version (\n\trepository_id VARCHAR(250) NOT NULL, \n\trepository_path TEXT, \n\tversion INTEGER, \n\tPRIMARY KEY (repository_id)\n)\n\n‘]
解决方案:
修改:
#cd /etc/mysql/mariadb.conf.d
修改下面每个文件中的字符集为utf8mb4 -> utf8,然后重启mysql,登陆mysql查询数据库默认字符集:
MariaDB [(none)]> show variables like "%char%";
+--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
将keystone数据库删掉,重新创建即可。
以上是关于安装keystone执行命令su -s /bin/sh -c "keystone-manage db_sync" keystone时出错,求大神解答的主要内容,如果未能解决你的问题,请参考以下文章
Linux系统下安装DB2数据库时,正常执行./db2setup没有任何的反应,根本就没有安装界面!晕死了、、、、、
Linux(fedora)下启动MySQL,结果显示:env: /etc/init.d/mysql:权限不够。 我已经将权限切换到su了
linux 下面安装的oracle,但home/oracle/里面没有.bash_profile这个文件,不知是丢失还是怎样,要怎么处理