Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create identity service: "An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-ed70ceef-c225-4f2e-a3cd-d7850f864df3)" #31

Closed
AJNOURI opened this issue Nov 9, 2016 · 9 comments

Comments

@AJNOURI
Copy link
Owner

AJNOURI commented Nov 9, 2016

When trying to install the identity service from liberty installation docs:
http://docs.openstack.org/liberty/install-guide-ubuntu/keystone-services.html

openstack service create --name keystone --description "OpenStack Identity" identity

An unexpected error prevented the server from fulfilling your request. (HTTP 500) (Request-ID: req-ed70ceef-c225-4f2e-a3cd-d7850f864df3)

Log file gives:
tail /var/log/keystone/keystone-wsgi-admin.log

2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1337, in _handle_dbapi_exception
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi util.raise_from_cause(newraise, exc_info)
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi reraise(type(exception), exception, tb=exc_tb)
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1139, in _execute_context
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi context)
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 450, in do_execute
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi cursor.execute(statement, parameters)
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi OperationalError: (sqlite3.OperationalError) no such table: service [SQL: u'INSERT INTO service (id, type, enabled, extra) VALUES (?, ?, ?, ?)'] [parameters: ('7f702fafd28848458ec5940433a6df47', u'identity', 1, '{"description": "OpenStack Identity", "name": "keystone"}')]
2016-11-09 00:41:05.712 2662 ERROR keystone.common.wsgi

@AJNOURI
Copy link
Owner Author

AJNOURI commented Nov 9, 2016

didn't comment reference to sqlite in /etc/keystone/keystone.conf

connection = sqlite:////var/lib/keystone/keystone.db

@AJNOURI AJNOURI closed this as completed Nov 9, 2016
@AJNOURI
Copy link
Owner Author

AJNOURI commented Nov 9, 2016

Another issue with the same symptom:

tail /var/log/keystone/keystone-wsgi-admin.log

2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi     engine_args, maker_args)
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 362, in _setup_for_connection
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi     sql_connection=sql_connection, **engine_kwargs)
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py", line 152, in create_engine
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi     test_conn = _test_connection(engine, max_retries, retry_interval)
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi   File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/engines.py", line 334, in _test_connection
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi     six.reraise(type(de_ref), de_ref)
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi   File "<string>", line 2, in reraise
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi DBConnectionError: (pymysql.err.OperationalError) (2003, "Can't connect to MySQL server on 'controller' ([Errno -2] Name or service not known)")
2016-11-09 00:53:31.757 2992 ERROR keystone.common.wsgi 

@AJNOURI
Copy link
Owner Author

AJNOURI commented Nov 9, 2016

Wrong controller hostname used in /etc/keystone/keystone.conf

[database]
connection = mysql+pymysql://keystone:openstack@controller/keystone

Mine is libcontroller

@AJNOURI AJNOURI reopened this Nov 9, 2016
@AJNOURI
Copy link
Owner Author

AJNOURI commented Nov 9, 2016

tail /var/log/keystone/keystone-wsgi-admin.log

2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 826, in _read_packet
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi packet.check_error()
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/pymysql/connections.py", line 370, in check_error
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi raise_mysql_exception(self._data)
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 116, in raise_mysql_exception
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi _check_mysql_exception(errinfo)
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi File "/usr/lib/python2.7/dist-packages/pymysql/err.py", line 109, in _check_mysql_exception
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi raise errorclass(errno,errorvalue)
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi ProgrammingError: (pymysql.err.ProgrammingError) (1146, u"Table 'keystone.service' doesn't exist") [SQL: u'INSERT INTO service (id, type, enabled, extra) VALUES (%s, %s, %s, %s)'] [parameters: ('37fd60101e904ba8a8d5861d964a375a', u'identity', 1, '{"description": "OpenStack Identity", "name": "keystone"}')]
2016-11-09 01:01:54.514 2990 ERROR keystone.common.wsgi

@AJNOURI
Copy link
Owner Author

AJNOURI commented Nov 9, 2016

Re-populate the identity service database after correcting the controller hostname in /etc/keystone/keystone.conf

su -s /bin/sh -c "keystone-manage db_sync" keystone

@AJNOURI AJNOURI closed this as completed Nov 9, 2016
@zakig7
Copy link

zakig7 commented Jan 7, 2017

i thought this time i'm gonna follow the Newton installation guide step by step but i got the same, gonna go ahead and comment that sqlite line in keystone.conf
(strange how one step is to delete the sqlite db file and never mention this step)
what about compute / neutron...et.conf?
you think they should be commented as well?

@AJNOURI
Copy link
Owner Author

AJNOURI commented Jan 19, 2017

Hi @eriksh7 , sorry for the late reply.
I think it doesn't harm to comment that line, as it refer to a not used db backend which apparently can create confusion.

@meysamkheyrollah
Copy link

meysamkheyrollah commented May 22, 2018

hi i have the same error but servername is coreect there is no line for sqlite connection in database field so dont need for comment and i did every thing step by step on openstack piko installition but i just get thiss error help pleaseeee !!! @AJNOURI

i checked keystone databse tables and populate didnt make any tables at all .

@ranjankrchaubey
Copy link

connection = mysql+pymysql://keystone:openstack@10.0.0.30/keystone (example)
change ip according to your config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants