I’m running openedx palm 2 with tutor 16.1.1 in production. When uploading files in ORAs, I get django.core.cache.backends.base.InvalidCacheBackendError: The connection 'ora2-storage' doesn't exist.
error. My full log is as follows:
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/clickjacking.py", line 50, in wrapped_view
resp = view_func(*args, **kwargs)
File "/openedx/edx-platform/./lms/djangoapps/courseware/block_render.py", line 865, in handle_xblock_callback
return _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, course=course)
File "/openedx/edx-platform/./lms/djangoapps/courseware/block_render.py", line 1014, in _invoke_xblock_handler
resp = handler_instance.handle(handler, req, suffix)
File "/openedx/venv/lib/python3.8/site-packages/xblock/mixins.py", line 84, in handle
return self.runtime.handle(self, handler_name, request, suffix)
File "/openedx/edx-platform/xmodule/x_module.py", line 1033, in handle
return super().handle(block, handler_name, request, suffix=suffix)
File "/openedx/venv/lib/python3.8/site-packages/xblock/runtime.py", line 1081, in handle
results = handler(request, suffix)
File "/openedx/venv/lib/python3.8/site-packages/xblock/mixins.py", line 63, in wrapper
response = func(self, request_json, suffix)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/xblock/submission_mixin.py", line 504, in upload_url
url = file_upload_api.get_upload_url(key, content_type)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/api.py", line 29, in get_upload_url
return backends.get_backend().get_upload_url(key, content_type)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/backends/filesystem.py", line 42, in get_upload_url
make_upload_url_available(self._get_key_name(key), self.UPLOAD_URL_TIMEOUT)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/backends/filesystem.py", line 93, in make_upload_url_available
get_cache().set(
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/backends/filesystem.py", line 82, in get_cache
return django.core.cache.caches[cache_name]
File "/openedx/venv/lib/python3.8/site-packages/django/utils/connection.py", line 61, in __getitem__
raise self.exception_class(f"The connection '{alias}' doesn't exist.")
django.core.cache.backends.base.InvalidCacheBackendError: The connection 'ora2-storage' doesn't exist.
2023-10-01 14:30:17,920 ERROR 26 [django.request] [user 4] [ip 188.210.145.80] log.py:224 - Internal Server Error: /courses/course-v1:edX+DemoX+Demo_Course/xblock/block-v1:edX+DemoX+Demo_Course+type@openassessment+block@9aad69c276a945a39e11cf3bcb5958aa/handler/upload_url
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/utils/connection.py", line 58, in __getitem__
return getattr(self._connections, alias)
File "/openedx/venv/lib/python3.8/site-packages/asgiref/local.py", line 105, in __getattr__
raise AttributeError(f"{self!r} object has no attribute {key!r}")
AttributeError: <asgiref.local.Local object at 0x7fabdb9e1160> object has no attribute 'ora2-storage'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/openedx/venv/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view
return view_func(*args, **kwargs)
File "/openedx/venv/lib/python3.8/site-packages/django/views/decorators/clickjacking.py", line 50, in wrapped_view
resp = view_func(*args, **kwargs)
File "/openedx/edx-platform/./lms/djangoapps/courseware/block_render.py", line 865, in handle_xblock_callback
return _invoke_xblock_handler(request, course_id, usage_id, handler, suffix, course=course)
File "/openedx/edx-platform/./lms/djangoapps/courseware/block_render.py", line 1014, in _invoke_xblock_handler
resp = handler_instance.handle(handler, req, suffix)
File "/openedx/venv/lib/python3.8/site-packages/xblock/mixins.py", line 84, in handle
return self.runtime.handle(self, handler_name, request, suffix)
File "/openedx/edx-platform/xmodule/x_module.py", line 1033, in handle
return super().handle(block, handler_name, request, suffix=suffix)
File "/openedx/venv/lib/python3.8/site-packages/xblock/runtime.py", line 1081, in handle
results = handler(request, suffix)
File "/openedx/venv/lib/python3.8/site-packages/xblock/mixins.py", line 63, in wrapper
response = func(self, request_json, suffix)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/xblock/submission_mixin.py", line 504, in upload_url
url = file_upload_api.get_upload_url(key, content_type)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/api.py", line 29, in get_upload_url
return backends.get_backend().get_upload_url(key, content_type)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/backends/filesystem.py", line 42, in get_upload_url
make_upload_url_available(self._get_key_name(key), self.UPLOAD_URL_TIMEOUT)
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/backends/filesystem.py", line 93, in make_upload_url_available
get_cache().set(
File "/openedx/venv/lib/python3.8/site-packages/openassessment/fileupload/backends/filesystem.py", line 82, in get_cache
return django.core.cache.caches[cache_name]
File "/openedx/venv/lib/python3.8/site-packages/django/utils/connection.py", line 61, in __getitem__
raise self.exception_class(f"The connection '{alias}' doesn't exist.")
django.core.cache.backends.base.InvalidCacheBackendError: The connection 'ora2-storage' doesn't exist.
I’m getting this error in a clean install, no customizations, no extra configs, etc. This feature worked fine in olive 4 by default.