当前位置: 代码迷 >> 综合 >> 搭建openstack时填充nova-api数据库(su -s /bin/sh -c “nova-manage api_db sync“ nova)错误
  详细解决方案

搭建openstack时填充nova-api数据库(su -s /bin/sh -c “nova-manage api_db sync“ nova)错误

热度:93   发布时间:2024-02-02 12:04:19.0

输入 su -s /bin/sh -c “nova-manage api_db sync” nova 后出现以下内容

[root@controller ~]# su -s /bin/sh -c "nova-manage api_db sync" nova
An error has occurred:
Traceback (most recent call last):File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 1657, in mainret = fn(*fn_args, **fn_kwargs)File "/usr/lib/python2.7/site-packages/nova/cmd/manage.py", line 784, in syncreturn migration.db_sync(version2, database='api')File "/usr/lib/python2.7/site-packages/nova/db/migration.py", line 26, in db_syncreturn IMPL.db_sync(version=version, database=database, context=context)File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/migration.py", line 53, in db_synccurrent_version = db_version(database, context=context)File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/migration.py", line 66, in db_versionreturn versioning_api.db_version(get_engine(database, context=context),File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/migration.py", line 43, in get_enginereturn db_session.get_api_engine()File "/usr/lib/python2.7/site-packages/nova/db/sqlalchemy/api.py", line 142, in get_api_enginereturn api_context_manager.get_legacy_facade().get_engine()File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 798, in get_legacy_facadereturn self._factory.get_legacy_facade()File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 347, in get_legacy_facadeself._start()File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 491, in _startengine_args, maker_args)File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 515, in _setup_for_connectionsql_connection=sql_connection, **engine_kwargs)File "/usr/lib/python2.7/site-packages/debtcollector/renames.py", line 43, in decoratorreturn wrapped(*args, **kwargs)File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 184, in create_enginetest_conn = _test_connection(engine, max_retries, retry_interval)File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 362, in _test_connectionreturn engine.connect()File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2102, in connectreturn self._connection_cls(self, **kwargs)File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 90, in __init__if connection is not None else engine.raw_connection()File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2188, in raw_connectionself.pool.unique_connection, _connection)File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2162, in _wrap_pool_connecte, dialect, self)File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1472, in _handle_dbapi_exception_noconnectionutil.raise_from_cause(newraise, exc_info)File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_causereraise(type(exception), exception, tb=exc_tb, cause=cause)File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2158, in _wrap_pool_connectreturn fn()File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 345, in unique_connectionreturn _ConnectionFairy._checkout(self)File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 782, in _checkoutfairy = _ConnectionRecord.checkout(pool)File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 532, in checkoutrec = pool._do_get()File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 1186, in _do_getself._dec_overflow()File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__compat.reraise(exc_type, exc_value, exc_tb)File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 1183, in _do_getreturn self._create_connection()File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 350, in _create_connectionreturn _ConnectionRecord(self)File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 477, in __init__self.__connect(first_connect_check=True)File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 667, in __connectconnection = pool._invoke_creator(self)File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 105, in connectreturn dialect.connect(*cargs, **cparams)File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 410, in connectreturn self.dbapi.connect(*cargs, **cparams)File "/usr/lib/python2.7/site-packages/pymysql/__init__.py", line 90, in Connectreturn Connection(*args, **kwargs)File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 706, in __init__self.connect()File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 932, in connectself._request_authentication()File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1152, in _request_authenticationauth_packet = self._read_packet()File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 1014, in _read_packetpacket.check_error()File "/usr/lib/python2.7/site-packages/pymysql/connections.py", line 393, in check_errorerr.raise_mysql_exception(self._data)File "/usr/lib/python2.7/site-packages/pymysql/err.py", line 107, in raise_mysql_exceptionraise errorclass(errno, errval)
OperationalError: (pymysql.err.OperationalError) (1045, u"Access denied for user 'nova'@'controller' (using password: YES)") (Background on this error at: http://sqlalche.me/e/e3q8)

求大神指点

  相关解决方案