can not connect to the database

Bug #1309379 reported by ynuzgw@yeah.net
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned

Bug Description

when I edit the /etc/hosts file on the controller node, the openstack get down,and the log of nova-manage.log is:
2014-04-16 09:56:38.768 4369 TRACE nova Traceback (most recent call last):
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/bin/nova-manage", line 1263, in <module>
2014-04-16 09:56:38.768 4369 TRACE nova main()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/bin/nova-manage", line 1255, in main
2014-04-16 09:56:38.768 4369 TRACE nova fn(*fn_args, **fn_kwargs)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/bin/nova-manage", line 657, in list
2014-04-16 09:56:38.768 4369 TRACE nova services = db.service_get_all(ctxt)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/db/api.py", line 132, in service_get_all
2014-04-16 09:56:38.768 4369 TRACE nova return IMPL.service_get_all(context, disabled)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 97, in wrapper
2014-04-16 09:56:38.768 4369 TRACE nova return f(*args, **kwargs)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 362, in service_get_all
2014-04-16 09:56:38.768 4369 TRACE nova query = model_query(context, models.Service)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 178, in model_query
2014-04-16 09:56:38.768 4369 TRACE nova session = kwargs.get('session') or get_session()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/openstack/common/db/sqlalchemy/session.py", line 325, in get_session
2014-04-16 09:56:38.768 4369 TRACE nova engine = get_engine()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/openstack/common/db/sqlalchemy/session.py", line 446, in get_engine
2014-04-16 09:56:38.768 4369 TRACE nova _ENGINE = create_engine(CONF.sql_connection)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/nova/openstack/common/db/sqlalchemy/session.py", line 547, in create_engine
2014-04-16 09:56:38.768 4369 TRACE nova engine.connect()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2471, in connect
2014-04-16 09:56:38.768 4369 TRACE nova return self._connection_cls(self, **kwargs)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 878, in __init__
2014-04-16 09:56:38.768 4369 TRACE nova self.__connection = connection or engine.raw_connection()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2557, in raw_connection
2014-04-16 09:56:38.768 4369 TRACE nova return self.pool.unique_connection()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 184, in unique_connection
2014-04-16 09:56:38.768 4369 TRACE nova return _ConnectionFairy(self).checkout()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 401, in __init__
2014-04-16 09:56:38.768 4369 TRACE nova rec = self._connection_record = pool._do_get()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 746, in _do_get
2014-04-16 09:56:38.768 4369 TRACE nova con = self._create_connection()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 189, in _create_connection
2014-04-16 09:56:38.768 4369 TRACE nova return _ConnectionRecord(self)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 282, in __init__
2014-04-16 09:56:38.768 4369 TRACE nova self.connection = self.__connect()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 344, in __connect
2014-04-16 09:56:38.768 4369 TRACE nova connection = self.__pool._creator()
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect
2014-04-16 09:56:38.768 4369 TRACE nova return dialect.connect(*cargs, **cparams)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 281, in connect
2014-04-16 09:56:38.768 4369 TRACE nova return self.dbapi.connect(*cargs, **cparams)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect
2014-04-16 09:56:38.768 4369 TRACE nova return Connection(*args, **kwargs)
2014-04-16 09:56:38.768 4369 TRACE nova File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 187, in __init__
2014-04-16 09:56:38.768 4369 TRACE nova super(Connection, self).__init__(*args, **kwargs2)
2014-04-16 09:56:38.768 4369 TRACE nova OperationalError: (OperationalError) (1045, "Access denied for user 'novaUser'@'compute1' (using password: YES)") None None

the problem is not simply about the openstack, it is about the mysql or other database. we need to delete the default user from the corresponding database to avoid the possible trap.

Yaguang Tang (heut2008)
Changed in nova:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.