Revision history [back]

click to hide/show revision 1
initial version

Keystone HTTP 500 Error on Initial admin user add

I'm trying to set up the admin user for keystone. I have been following the guide http://docs.openstack.org/icehouse/install-guide/install/yum/content/keystone-users.html and all the preceeding chapters accordingly.

When I run:

[root@ContNode001 ~]# keystone user-create --name=admin --pass=PASS --email=EM@I.L

I get:

An unexpected error prevented the server from fulfilling your request. (HTTP 500)

The following is the log information:

[root@ContNode001 ~]# tail /var/log/keystone/keystone.log 
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     context)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     cursor.execute(statement, parameters)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     self.errorhandler(self, exc, value)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     raise errorclass, errorvalue
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi OperationalError: (OperationalError) (1046, 'No database selected') 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi

Why is no database selected? Thanks.

Keystone HTTP 500 Error on Initial admin user add

I'm trying to set up the admin user for keystone. I have been following the guide http://docs.openstack.org/icehouse/install-guide/install/yum/content/keystone-users.html and all the preceeding chapters accordingly.

When I run:

[root@ContNode001 ~]# keystone user-create --name=admin --pass=PASS --email=EM@I.L

I get:

An unexpected error prevented the server from fulfilling your request. (HTTP 500)

The following is the log information:

[root@ContNode001 ~]# tail /var/log/keystone/keystone.log 
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     context)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     cursor.execute(statement, parameters)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     self.errorhandler(self, exc, value)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     raise errorclass, errorvalue
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi OperationalError: (OperationalError) (1046, 'No database selected') 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi

Why is no database selected? Thanks.

EDIT: I modifed my /etc/keystone/keystone.conf thusly:

connection = mysql://keystone:THE_PASS@127.0.0.1/keystone

However that has resulted in the following:

[root@ContNode001 ~]# tail /var/log/keystone/keystone.log 
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     context)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     cursor.execute(statement, parameters)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     self.errorhandler(self, exc, value)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     raise errorclass, errorvalue
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi ProgrammingError: (ProgrammingError) (1146, "Table 'keystone.domain' doesn't exist") 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi

Keystone HTTP 500 Error on Initial admin user add

I'm trying to set up the admin user for keystone. I have been following the guide http://docs.openstack.org/icehouse/install-guide/install/yum/content/keystone-users.html and all the preceeding chapters accordingly.

When I run:

[root@ContNode001 ~]# keystone user-create --name=admin --pass=PASS --email=EM@I.L

I get:

An unexpected error prevented the server from fulfilling your request. (HTTP 500)

The following is the log information:

[root@ContNode001 ~]# tail /var/log/keystone/keystone.log 
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     context)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     cursor.execute(statement, parameters)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     self.errorhandler(self, exc, value)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     raise errorclass, errorvalue
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi OperationalError: (OperationalError) (1046, 'No database selected') 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi

Why is no database selected? Thanks.

EDIT: I modifed my /etc/keystone/keystone.conf thusly:

connection = mysql://keystone:THE_PASS@127.0.0.1/keystone

However that has resulted in the following:

[root@ContNode001 ~]# tail /var/log/keystone/keystone.log 
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     context)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     cursor.execute(statement, parameters)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     self.errorhandler(self, exc, value)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     raise errorclass, errorvalue
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi ProgrammingError: (ProgrammingError) (1146, "Table 'keystone.domain' doesn't exist") 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi

Do I explicitly need to create all of these tables? I wouldn't think so...

Keystone HTTP 500 Error on Initial admin user add

I'm trying to set up the admin user for keystone. I have been following the guide http://docs.openstack.org/icehouse/install-guide/install/yum/content/keystone-users.html and all the preceeding chapters accordingly.

When I run:

[root@ContNode001 ~]# keystone user-create --name=admin --pass=PASS --email=EM@I.L

I get:

An unexpected error prevented the server from fulfilling your request. (HTTP 500)

The following is the log information:

[root@ContNode001 ~]# tail /var/log/keystone/keystone.log 
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     context)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     cursor.execute(statement, parameters)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     self.errorhandler(self, exc, value)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi     raise errorclass, errorvalue
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi OperationalError: (OperationalError) (1046, 'No database selected') 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)
2014-05-19 11:59:12.836 2361 TRACE keystone.common.wsgi

Why is no database selected? Thanks.

EDIT: I modifed my /etc/keystone/keystone.conf thusly:

connection = mysql://keystone:THE_PASS@127.0.0.1/keystone

However that has resulted in the following:

[root@ContNode001 ~]# tail /var/log/keystone/keystone.log 
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     context)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     cursor.execute(statement, parameters)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     self.errorhandler(self, exc, value)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi   File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi     raise errorclass, errorvalue
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi ProgrammingError: (ProgrammingError) (1146, "Table 'keystone.domain' doesn't exist") 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)
2014-05-19 12:25:11.584 2420 TRACE keystone.common.wsgi

Do I explicitly need to create all of these tables? I wouldn't think so...

EDIT 2: PROBLEM SOLVED

This is apparently a bug in the setup (via https://bugs.launchpad.net/keystone/+bug/1314125):

When MySQL controller is not changed in /etc/keystone/keystone.conf

Then when you are using "su -s /bin/sh -c "keystone-manage db_sync" keystone" command won't produce any errors.. errors appear only when you add an user for example:

keystone user-create --name=admin --pass=password --<email address="" hidden=""> An unexpected error prevented the server from fulfilling your request. (HTTP 500)

In keystone.log file there will be: CRITICAL keystone [-] OperationalError: (OperationalError) (2005, "Unknown MySQL server host 'controller' (1)") None None

If controller is changed in /etc/keystone/keystone.conf user must re-run following command: su -s /bin/sh -c "keystone-manage db_sync" keystone

otherwise when they try to create an user they will receive the error above and error in keystone.log

TRACE keystone.common.wsgi ProgrammingError: (ProgrammingError) (1146, "Table 'keystone.domain' doesn't exist") 'SELECT domain.id AS domain_id, domain.name AS domain_name, domain.enabled AS domain_enabled, domain.extra AS domain_extra \nFROM domain \nWHERE domain.id = %s' ('default',)