Univention Bugzilla – Bug 44441
SQL OperationalError during App installation
Last modified: 2018-02-16 14:05:56 CET
Version: 4.2-0 errata2 (Lesum) Execution of command 'appcenter/docker/progress' has failed: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 249, in execute function.__func__(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress ret = progress_obj.poll() File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 375, in invoke_docker result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs) File "%PY2.7%/univention/appcenter/actions/__init__.py", line 227, in call return obj.call_with_namespace(namespace) File "%PY2.7%/univention/appcenter/actions/__init__.py", line 233, in call_with_namespace result = self.main(namespace) File "%PY2.7%/univention/appcenter/actions/install.py", line 70, in main return self.do_it(args) File "%PY2.7%/univention/appcenter/actions/install_base.py", line 110, in do_it self._do_it(app, args) File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 67, in _do_it ret = super(Install, self)._do_it(app, args) File "%PY2.7%/univention/appcenter/actions/install.py", line 83, in _do_it self._register_database(app) File "%PY2.7%/univention/appcenter/actions/register.py", line 342, in _register_database database_connector.create_database() File "%PY2.7%/univention/appcenter/database.py", line 184, in create_database self.create_db_and_user(password) File "%PY2.7%/univention/appcenter/database.py", line 282, in create_db_and_user self.execute('CREATE DATABASE IF NOT EXISTS `%s`' % self.escape(self.get_db_name())) File "%PY2.7%/univention/appcenter/database.py", line 279, in escape return self.get_root_connection().escape(unicode(value)) File "%PY2.7%/univention/appcenter/database.py", line 257, in get_root_connection self._connection = mysql.connect(host='localhost', user='root', passwd=passwd) 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) OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")
Version: 4.2-0 errata10 (Lesum) Die Ausführung des Kommandos appcenter/docker/progress ist fehlgeschlagen: Traceback (most recent call last): File "%PY2.7%/univention/management/console/base.py", line 249, in execute function.__func__(self, request, *args, **kwargs) File "%PY2.7%/univention/management/console/modules/decorators.py", line 318, in _response result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/mixins.py", line 149, in progress ret = progress_obj.poll() File "%PY2.7%/univention/management/console/modules/decorators.py", line 309, in _thread result = _multi_response(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 192, in _response return function(self, request) File "%PY2.7%/univention/management/console/modules/decorators.py", line 440, in _response return list(function(self, iterator, *nones)) File "%PY2.7%/univention/management/console/modules/decorators.py", line 286, in _fake_func yield function(self, *args) File "%PY2.7%/univention/management/console/modules/appcenter/__init__.py", line 375, in invoke_docker result['success'] = action.call(app=app, username=self.username, password=self.password, **kwargs) File "%PY2.7%/univention/appcenter/actions/__init__.py", line 227, in call return obj.call_with_namespace(namespace) File "%PY2.7%/univention/appcenter/actions/__init__.py", line 233, in call_with_namespace result = self.main(namespace) File "%PY2.7%/univention/appcenter/actions/install.py", line 70, in main return self.do_it(args) File "%PY2.7%/univention/appcenter/actions/install_base.py", line 110, in do_it self._do_it(app, args) File "%PY2.7%/univention/appcenter/actions/docker_install.py", line 67, in _do_it ret = super(Install, self)._do_it(app, args) File "%PY2.7%/univention/appcenter/actions/install.py", line 83, in _do_it self._register_database(app) File "%PY2.7%/univention/appcenter/actions/register.py", line 342, in _register_database database_connector.create_database() File "%PY2.7%/univention/appcenter/database.py", line 178, in create_database if self.db_user_exists(): File "%PY2.7%/univention/appcenter/database.py", line 275, in db_user_exists cursor = self.execute("SELECT EXISTS (SELECT DISTINCT user FROM mysql.user WHERE user = '%s')" % self.escape(self.get_db_user())) File "%PY2.7%/univention/appcenter/database.py", line 279, in escape return self.get_root_connection().escape(unicode(value)) File "%PY2.7%/univention/appcenter/database.py", line 257, in get_root_connection self._connection = mysql.connect(host='localhost', user='root', passwd=passwd) 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) OperationalError: (2002, "Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)")
Version: 4.2-2 errata203 (Lesum) Remark: Tritt bei der Installation der WordPress App auf. OperationalError: (1045, "Access denied for user 'root'@'localhost' (using password: YES)")
Fixed in univention-appcenter (6.0.10-22)
(Just a better error message - and we do not receive 500, instead 418)
(In reply to Dirk Wiesenthal from comment #4) > (Just a better error message - and we do not receive 500, instead 418) No, we don't. From management/univention-appcenter/umc/python/appcenter/sanitizers.py: 65 » if isinstance(exc, (Abort, SystemError, AppcenterServerContactFailed)): 66 » » MODULE.error(str(exc)) 67 » » raise umcm.UMC_Error(str(exc), status=500) → The status is 500 and should remain 500! Using 418 (or any of the other codes from python/appcenter/exceptions.py) would violate the HTTP semantics.
(In reply to Florian Best from comment #5) > (In reply to Dirk Wiesenthal from comment #4) > > (Just a better error message - and we do not receive 500, instead 418) > No, we don't. > From management/univention-appcenter/umc/python/appcenter/sanitizers.py: > 65 » if isinstance(exc, (Abort, SystemError, > AppcenterServerContactFailed)): > 66 » » MODULE.error(str(exc)) > 67 » » raise umcm.UMC_Error(str(exc), status=500) > > → The status is 500 and should remain 500! Using 418 (or any of the other > codes from python/appcenter/exceptions.py) would violate the HTTP semantics. I meant the code sent to Univention after an installation. 500 is traceback, 400+ is defined in python/appcenter/exceptions.py. 418 is DatabaseConnectorError
please rebuild in ucs4.2-3
Rebuilt as univention-appcenter 6.0.11-1A~4.2.0.201711231631
OK, QA'ed with 4.2-2 OK - error dialog if mysql is down OK - changelog
UCS 4.2-3 has been released.
Reported again: Version: 4.2-1 errata197 (Lesum)