Solved Not uploading because of internal server error 500
I just set up a new cloudron instance and installed paperless-ng. Unfortunatly the logs and the ui are givging me an error when I try to upload a file:
Feb 21 12:26:34 [2022-02-21 11:26:34,550] [ERROR] [django.request] Internal Server Error: /api/documents/post_document/ Feb 21 12:26:34 Traceback (most recent call last): Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/asgiref/sync.py", line 482, in thread_handler Feb 21 12:26:34 raise exc_info Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/exception.py", line 38, in inner Feb 21 12:26:34 response = await get_response(request) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/django/core/handlers/base.py", line 233, in _get_response_async Feb 21 12:26:34 response = await wrapped_callback(request, *callback_args, **callback_kwargs) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/asgiref/sync.py", line 444, in __call__ Feb 21 12:26:34 ret = await asyncio.wait_for(future, timeout=None) Feb 21 12:26:34 File "/usr/lib/python3.8/asyncio/tasks.py", line 455, in wait_for Feb 21 12:26:34 return await fut Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/asgiref/current_thread_executor.py", line 22, in run Feb 21 12:26:34 result = self.fn(*self.args, **self.kwargs) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/asgiref/sync.py", line 486, in thread_handler Feb 21 12:26:34 return func(*args, **kwargs) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/django/views/decorators/csrf.py", line 54, in wrapped_view Feb 21 12:26:34 return view_func(*args, **kwargs) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/django/views/generic/base.py", line 70, in view Feb 21 12:26:34 return self.dispatch(request, *args, **kwargs) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 509, in dispatch Feb 21 12:26:34 response = self.handle_exception(exc) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 469, in handle_exception Feb 21 12:26:34 self.raise_uncaught_exception(exc) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 480, in raise_uncaught_exception Feb 21 12:26:34 raise exc Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/rest_framework/views.py", line 506, in dispatch Feb 21 12:26:34 response = handler(request, *args, **kwargs) Feb 21 12:26:34 File "/app/code/src/documents/views.py", line 487, in post Feb 21 12:26:34 async_task("documents.tasks.consume_file", Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/django_q/tasks.py", line 73, in async_task Feb 21 12:26:34 enqueue_id = broker.enqueue(pack) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/django_q/brokers/redis_broker.py", line 18, in enqueue Feb 21 12:26:34 return self.connection.rpush(self.list_key, task) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/redis/client.py", line 2016, in rpush Feb 21 12:26:34 return self.execute_command('RPUSH', name, *values) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/redis/client.py", line 901, in execute_command Feb 21 12:26:34 return self.parse_response(conn, command_name, **options) Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/redis/client.py", line 915, in parse_response Feb 21 12:26:34 response = connection.read_response() Feb 21 12:26:34 File "/usr/local/lib/python3.8/dist-packages/redis/connection.py", line 756, in read_response Feb 21 12:26:34 raise response Feb 21 12:26:34 redis.exceptions.ResponseError: DENIED Redis is running in protected mode because protected mode is enabled, no bind address was specified, no authentication password is requested to clients. In this mode connections are only accepted from the loopback interface. If you want to connect from external computers to Redis you may adopt one of the following solutions: 1) Just disable protected mode sending the command 'CONFIG SET protected-mode no' from the loopback interface by connecting to Redis from the same host the server is running, however MAKE SURE Redis is not publicly accessible from internet if you do so. Use CONFIG REWRITE to make this change permanent. 2) Alternatively you can just disable the protected mode by editing the Redis configuration file, and setting the protected mode option to 'no', and then restarting the server. 3) If you started the server manually just for testing, restart it with the '--protected-mode no' option. 4) Setup a bind address or an authentication password. NOTE: You only need to do one of the above things in order for the server to start accepting connections from the outside.
What can I do? I already checked if redis is up and running.
PS: @nebulon I forwarded our conversation to the forum.
I can reproduce this and it seems to be a regression in Cloudron v7.1
Apparently Redis defaults have changed around security and protected mode is now the default for connections without a password https://redis.io/topics/security
Since paperless-ng package uses the Redis addon without password, it fails. Have to see if we need to wait for a Cloudron patch release, or better, we can make paperless use the Redis password. Note that this does not mean it is currently unprotected, everything is still on the Cloudron local network.
@nebulon So the safest way would be to do a fresh install of Cloudron 7.0.4 until the changes are made?
@manngobaum currently it seems like it. So far I also wasn't able to feed paperless-ng's redis module a password.
@manngobaum we have fixed this now. Will release 7.1.1 with a fix soonish (today or tomorrow)
timconsidine last edited by
@girish great, I am also unable to upload, but if it's app-specific, everyone will be (doh!)
@timconsidine Cloudron v7.1.1 is available now for manual pre-release update. This fixes the issue, however only update for now, if you do not have any custom ports open via https://docs.cloudron.io/networking/#whitelist-ports, since we further have found a regression in the firewall script after the ipv6 change.
timconsidine last edited by
@nebulon thank you