Created 04-29-2020 07:20 AM
Team ,
We are seeing below errors when querying hive from HUE .
Error 1 :-
[29/Apr/2020 07:07:22 -0700] middleware ERROR Error saving profile information
Traceback (most recent call last):
File "/usr/local/hue/apps/useradmin/src/useradmin/middleware.py", line 104, in process_request
profile.save()
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/base.py", line 808, in save
force_update=force_update, update_fields=update_fields)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/base.py", line 838, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/base.py", line 905, in _save_table
forced_update)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/base.py", line 955, in _do_update
return filtered._update(values) > 0
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/query.py", line 667, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/sql/compiler.py", line 1204, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
OperationalError: database is locked
ERROR 2:-
[29/Apr/2020 07:06:51 -0700] exception ERROR Internal Server Error: /hue/accounts/login
Traceback (most recent call last):
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/handlers/exception.py", line 41, in inner
response = get_response(request)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/handlers/base.py", line 249, in _legacy_get_response
response = self._get_response(request)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/utils/decorators.py", line 185, in inner
return func(*args, **kwargs)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/django_axes-2.2.0-py2.7.egg/axes/decorators.py", line 271, in decorated_login
response = func(request, *args, **kwargs)
File "/usr/local/hue/desktop/core/src/desktop/auth/views.py", line 206, in dt_login
'user': request.user
File "/usr/local/hue/desktop/core/src/desktop/lib/django_util.py", line 241, in render
**kwargs
File "/usr/local/hue/desktop/core/src/desktop/lib/django_util.py", line 154, in _render_to_response
return django_mako.render_to_response(template, *args, **kwargs)
File "/usr/local/hue/desktop/core/src/desktop/lib/django_mako.py", line 127, in render_to_response
return HttpResponse(render_to_string(template_name, data_dictionary), **kwargs)
File "/usr/local/hue/desktop/core/src/desktop/lib/django_mako.py", line 116, in render_to_string_normal
result = template.render(**data_dict)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/template.py", line 462, in render
return runtime._render(self, self.callable_, args, data)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/runtime.py", line 838, in _render
**_kwargs_for_callable(callable_, data))
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/runtime.py", line 873, in _render_context
_exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Mako-1.0.7-py2.7.egg/mako/runtime.py", line 899, in _exec_template
callable_(context, *args, **kwargs)
File "/tmp/tmpVKDTTV/desktop/login.mako.py", line 176, in render_body
__M_writer(unicode( commonfooter(None, messages) ))
File "/usr/local/hue/desktop/core/src/desktop/views.py", line 559, in commonfooter
hue_settings = Settings.get_settings()
File "/usr/local/hue/desktop/core/src/desktop/models.py", line 130, in get_settings
settings, created = Settings.objects.get_or_create(id=1)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/query.py", line 464, in get_or_create
return self.get(**lookup), False
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/query.py", line 374, in get
num = len(clone)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/query.py", line 232, in __len__
self._fetch_all()
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/query.py", line 1121, in _fetch_all
self._result_cache = list(self._iterable_class(self))
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/query.py", line 53, in __iter__
results = compiler.execute_sql(chunked_fetch=self.chunked_fetch)
File "/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.11.22-py2.7.egg/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
TransactionManagementError: An error occurred in the current transaction. You can't execute queries until the end of the 'atomic' block.
Any help is appreciated .
Regards
Bharad
Created 06-26-2020 09:20 AM
Hi,
We are also getting the same error almost every week for any database. Can we get any permanent solution for this? After waiting for sometime it get resolved itself. But i want to know the root cause for this and if it database or table gets locked, how i can release that lock for those DB and table in MySQL database.