[Openstack] keystone start fails due to mysql password mismatch running stack.sh
Snider, Tim
Tim.Snider at netapp.com
Fri Jan 11 20:13:08 UTC 2013
During execution of stack.sh I get permission denied errors when keystone is trying to start due to the wrong password being used to start mySQL.
The localrc file has the correct unencoded password:
root at 84Server:~/devstack# cat localrc
FLOATING_RANGE=192.168.1.224/27
FIXED_RANGE=10.0.0.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=infiniti
MYSQL_PASSWORD=infiniti
RABBIT_PASSWORD=infiniti
And the password appears to be encoded correctly in the database. I changed it on the SQL command line, it looked different and I changed it back.
mysql> select host, user, password from mysql.user;
+-----------+------------------+-------------------------------------------+
| host | user | password |
+-----------+------------------+-------------------------------------------+
| localhost | root | *5676DE1B06BBA71BC315CF7893A8CED00B02F1C4 |
| 84Server | root | *5676DE1B06BBA71BC315CF7893A8CED00B02F1C4 |
| 127.0.0.1 | root | *5676DE1B06BBA71BC315CF7893A8CED00B02F1C4 |
| ::1 | root | *5676DE1B06BBA71BC315CF7893A8CED00B02F1C4 |
| localhost | | |
| 84Server | | |
| localhost | debian-sys-maint | *810EB3730113CBACFA7E304BF5D7F41964915369 |
| % | root | *5676DE1B06BBA71BC315CF7893A8CED00B02F1C4 |
+-----------+------------------+-------------------------------------------+
8 rows in set (0.00 sec)
It appears that the script is trying to use (a wrong) encoded password on the command line.
+ mysql -uroot -pec0ff00c787573ed5ea2 -e 'DROP DATABASE IF EXISTS keystone;'
What do I need to change to have the script use the correct password?
Thanks,
Tim
+ echo Starting Keystone
Starting Keystone
+ init_keystone
+ recreate_database keystone utf8
+ local db=keystone
+ local charset=utf8
+ recreate_database_mysql keystone utf8
+ local db=keystone
+ local charset=utf8
+ mysql -uroot -pec0ff00c787573ed5ea2 -e 'DROP DATABASE IF EXISTS keystone;'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
+ mysql -uroot -pec0ff00c787573ed5ea2 -e 'CREATE DATABASE keystone CHARACTER SET utf8;'
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
+ /opt/stack/keystone/bin/keystone-manage db_sync
Traceback (most recent call last):
File "/opt/stack/keystone/bin/keystone-manage", line 28, in <module> cli.main(argv=sys.argv, config_files=config_files)
File "/opt/stack/keystone/keystone/cli.py", line 144, in main CONF.command.cmd_class.main()
File "/opt/stack/keystone/keystone/cli.py", line 49, in main driver.db_sync()
File "/opt/stack/keystone/keystone/identity/backends/sql.py", line 167, in db_sync migration.db_sync()
File "/opt/stack/keystone/keystone/common/sql/migration.py", line 49, in db_sync current_version = db_version()
File "/opt/stack/keystone/keystone/common/sql/migration.py", line 63, in db_version return db_version_control(0)
File "/opt/stack/keystone/keystone/common/sql/migration.py", line 68, in db_version_control versioning_api.version_control(CONF.sql.connection, repo_path, version)
File "<string>", line 2, in version_control
File "/usr/lib/python2.7/dist-packages/migrate/versioning/util/__init__.py", line 159, in with_engine return f(*a, **kw)
File "/usr/lib/python2.7/dist-packages/migrate/versioning/api.py", line 250, in version_control ControlledSchema.create(engine, repository, version)
File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 139, in create table = cls._create_table_version(engine, repository, version)
File "/usr/lib/python2.7/dist-packages/migrate/versioning/schema.py", line 180, in _create_table_version if not table.exists():
File "/usr/lib/python2.7/dist-packages/sqlalchemy/schema.py", line 579, in exists self.name, schema=self.schema)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2424, in run_callable conn = self.contextual_connect()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 2490, in contextual_connect self.pool.connect(),
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 224, in connect return _ConnectionFairy(self).checkout()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 387, in __init__ rec = self._connection_record = pool._do_get()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 741, in _do_get con = self._create_connection()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 188, in _create_connection return _ConnectionRecord(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 270, in __init__ self.connection = self.__connect()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line 330, in __connect connection = self.__pool._creator()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 80, in connect return dialect.connect(*cargs, **cparams)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 281, in connect return self.dbapi.connect(*cargs, **cparams)
File "/usr/lib/python2.7/dist-packages/MySQLdb/__init__.py", line 81, in Connect return Connection(*args, **kwargs)
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 'root'@'localhost' (using password: YES)") None None
+ [[ PKI == \P\K\I ]]
+ rm -rf /etc/keystone/ssl
+ /opt/stack/keystone/bin/keystone-manage pki_setup
More information about the Openstack
mailing list