最近我的Openstack(使用RDO)出现了错误。管理员用户的密码正确。我可以通过"keystone","root"使用mysql。这是 detail(/var/log/keystone/keystone.log):
(OperationalError) (2003, "Can't connect to MySQL server on '10.0.3.139' (111)") None None
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/keystone/common/wsgi.py", line 238, in __call__
result = method(context, **params)
File "/usr/lib/python2.6/site-packages/keystone/token/controllers.py", line 127, in authenticate
auth_token_data, roles_ref=roles_ref, catalog_ref=catalog_ref)
File "/usr/lib/python2.6/site-packages/keystone/common/manager.py", line 44, in _wrapper
return f(*args, **kw)
File "/usr/lib/python2.6/site-packages/keystone/token/providers/uuid.py", line 386, in issue_v2_token
self.token_api.get_token(token_id)
File "/usr/lib/python2.6/site-packages/keystone/token/core.py", line 128, in get_token
token_ref = self._get_token(unique_id)
File "/usr/lib/python2.6/site-packages/dogpile/cache/region.py", line 936, in decorate
should_cache_fn)
File "/usr/lib/python2.6/site-packages/dogpile/cache/region.py", line 588, in get_or_create
async_creator) as value:
File "/usr/lib/python2.6/site-packages/dogpile/core/dogpile.py", line 158, in __enter__
return self._enter()
File "/usr/lib/python2.6/site-packages/dogpile/core/dogpile.py", line 98, in _enter
generated = self._enter_create(createdtime)
File "/usr/lib/python2.6/site-packages/dogpile/core/dogpile.py", line 149, in _enter_create
created = self.creator()
File "/usr/lib/python2.6/site-packages/dogpile/cache/region.py", line 565, in gen_value
created_value = creator()
File "/usr/lib/python2.6/site-packages/dogpile/cache/region.py", line 932, in creator
return fn(*arg, **kw)
File "/usr/lib/python2.6/site-packages/keystone/token/core.py", line 140, in _get_token
return self.driver.get_token(token_id)
File "/usr/lib/python2.6/site-packages/keystone/token/backends/sql.py", line 46, in get_token
token_ref = session.query(TokenModel).get(token_id)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 775, in get
return self._load_on_ident(key)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2512, in _load_on_ident
return q.one()
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2184, in one
ret = list(self)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2227, in __iter__
return self._execute_and_instances(context)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2240, in _execute_and_instances
close_with_result=True)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2231, in _connection_from_session
**kw)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 730, in connection
close_with_result=close_with_result)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/session.py", line 736, in _connection_for_bind
return engine.contextual_connect(**kwargs)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 2490, in contextual_connect
self.pool.connect(),
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 224, in connect
return _ConnectionFairy(self).checkout()
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 387, in __init__
rec = self._connection_record = pool._do_get()
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 741, in _do_get
con = self._create_connection()
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 188, in _create_connection
return _ConnectionRecord(self)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 270, in __init__
self.connection = self.__connect()
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/pool.py", line 330, in __connect
connection = self.__pool._creator()
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/strategies.py", line 80, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 281, in connect
return self.dbapi.connect(*cargs, **cparams)
File "/usr/lib64/python2.6/site-packages/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 187, in __init__
super(Connection, self).__init__(*args, **kwargs2)
OperationalError: (OperationalError) (2003, "Can't connect to MySQL server on '10.0.3.139' (111)") None None
MySQL有什么问题?有人可以给我一些建议吗?
确保MySQL服务正在运行 service mysql status
接下来,确保它正在侦听"10.0.3.139"。默认情况下,mysql 在本地主机上侦听。要更改该内容,请编辑/etc/mysql/my.cnf 并将绑定地址设置为 0.0.0.0 并重新启动服务。这将使它侦听所有可用的接口。最后,您必须确保在/etc/keystone/keystone.conf 中正确配置了 mysql 数据库、用户名和密码,并且用户/数据库是在 mysql 中创建的。
使用以下链接了解更多详细信息。http://docs.openstack.org/grizzly/openstack-compute/install/apt/content/install-keystone.html