paperless-ngx / paperless-ngx

A community-supported supercharged version of paperless: scan, index and archive all your physical documents
https://docs.paperless-ngx.com
GNU General Public License v3.0
21.94k stars 1.19k forks source link

[BUG] Internal Server Error 500 #4670

Closed BlackJoker90 closed 11 months ago

BlackJoker90 commented 11 months ago

Description

I am writing to report a recent issue I've encountered with my setup after updating the Redis container. Since the update, I am unable to access Paperless NGX. This issue is particularly perplexing because, under Portainer, the container is shown as 'running', but it appears not to be associated with any network (refer to the attached screenshot for clarity). Additionally, in the Container Manager on my Synology system, the Paperless NGX container is indicated as 'stopped'.

I rely heavily on Paperless NGX for my document management and am currently unable to access it. This situation is quite disruptive to my workflow, and I am keen on resolving it as soon as possible.

Could you please help me troubleshoot this issue? I would appreciate any guidance or steps I can follow to restore access to Paperless NGX.

Thank you for your time and assistance in this matter.

image

Steps to reproduce

See description

Webserver logs

Paperless-NGX
date,stream,content
2023/11/23 20:28:44,stderr,

2023/11/23 20:28:44,stderr,django.db.utils.OperationalError: could not translate host name "db" to address: Name or service not known

2023/11/23 20:28:44,stderr,"    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py\", line 122, in connect
"
2023/11/23 20:28:44,stderr,    connection = Database.connect(**conn_params)

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py\", line 215, in get_new_connection
"
2023/11/23 20:28:44,stderr,"    return func(*args, **kwargs)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py\", line 26, in inner
"
2023/11/23 20:28:44,stderr,    self.connection = self.get_new_connection(conn_params)

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py\", line 263, in connect
"
2023/11/23 20:28:44,stderr,"    return func(*args, **kwargs)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py\", line 26, in inner
"
2023/11/23 20:28:44,stderr,    self.connect()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py\", line 282, in ensure_connection
"
2023/11/23 20:28:44,stderr,    raise dj_exc_value.with_traceback(traceback) from exc_value

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/utils.py\", line 91, in __exit__
"
2023/11/23 20:28:44,stderr,    self.connect()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py\", line 282, in ensure_connection
"
2023/11/23 20:28:44,stderr,"    return func(*args, **kwargs)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py\", line 26, in inner
"
2023/11/23 20:28:44,stderr,    self.ensure_connection()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py\", line 299, in _cursor
"
2023/11/23 20:28:44,stderr,    return self._cursor()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py\", line 323, in cursor
"
2023/11/23 20:28:44,stderr,"    return func(*args, **kwargs)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py\", line 26, in inner
"
2023/11/23 20:28:44,stderr,    with self.connection.cursor() as cursor:

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/migrations/recorder.py\", line 57, in has_table
"
2023/11/23 20:28:44,stderr,    if self.has_table():

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/migrations/recorder.py\", line 81, in applied_migrations
"
2023/11/23 20:28:44,stderr,    self.applied_migrations = recorder.applied_migrations()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/migrations/loader.py\", line 235, in build_graph
"
2023/11/23 20:28:44,stderr,    self.build_graph()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/migrations/loader.py\", line 58, in __init__
"
2023/11/23 20:28:44,stderr,    self.loader = MigrationLoader(self.connection)

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/migrations/executor.py\", line 18, in __init__
"
2023/11/23 20:28:44,stderr,"    executor = MigrationExecutor(connection, self.migration_progress_callback)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/core/management/commands/migrate.py\", line 114, in handle
"
2023/11/23 20:28:44,stderr,"    res = handle_func(*args, **kwargs)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/core/management/base.py\", line 96, in wrapped
"
2023/11/23 20:28:44,stderr,"    output = self.handle(*args, **options)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/core/management/base.py\", line 448, in execute
"
2023/11/23 20:28:44,stderr,"    self.execute(*args, **cmd_options)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/core/management/base.py\", line 402, in run_from_argv
"
2023/11/23 20:28:44,stderr,    self.fetch_command(subcommand).run_from_argv(self.argv)

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py\", line 440, in execute
"
2023/11/23 20:28:44,stderr,    utility.execute()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py\", line 446, in execute_from_command_line
"
2023/11/23 20:28:44,stderr,    execute_from_command_line(sys.argv)

2023/11/23 20:28:44,stderr,"  File \"/usr/src/paperless/src/manage.py\", line 10, in <module>
"
2023/11/23 20:28:44,stderr,Traceback (most recent call last):

2023/11/23 20:28:44,stderr,

2023/11/23 20:28:44,stderr,The above exception was the direct cause of the following exception:

2023/11/23 20:28:44,stderr,

2023/11/23 20:28:44,stderr,

2023/11/23 20:28:44,stderr,psycopg2.OperationalError: could not translate host name "db" to address: Name or service not known

2023/11/23 20:28:44,stderr,"    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/psycopg2/__init__.py\", line 122, in connect
"
2023/11/23 20:28:44,stderr,    connection = Database.connect(**conn_params)

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/postgresql/base.py\", line 215, in get_new_connection
"
2023/11/23 20:28:44,stderr,"    return func(*args, **kwargs)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py\", line 26, in inner
"
2023/11/23 20:28:44,stderr,    self.connection = self.get_new_connection(conn_params)

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py\", line 263, in connect
"
2023/11/23 20:28:44,stderr,"    return func(*args, **kwargs)
"
2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/utils/asyncio.py\", line 26, in inner
"
2023/11/23 20:28:44,stderr,    self.connect()

2023/11/23 20:28:44,stderr,"  File \"/usr/local/lib/python3.9/site-packages/django/db/backends/base/base.py\", line 282, in ensure_connection
"
2023/11/23 20:28:44,stderr,Traceback (most recent call last):

2023/11/23 20:28:43,stdout,Apply database migrations...

2023/11/23 20:28:43,stdout,Connected to Redis broker.

2023/11/23 20:28:43,stdout,Waiting for Redis...

2023/11/23 20:28:43,stdout,Waiting for PostgreSQL to start...

2023/11/23 20:28:43,stdout,Adjusting permissions of paperless files. This may take a while.

2023/11/23 20:28:43,stdout,Creating directory /tmp/paperless

2023/11/23 20:28:43,stdout,Paperless-ngx docker container starting...

Browser logs

No response

Paperless-ngx version

1.17.4

Host OS

Synology DS1520+

Installation method

Docker - official image

Browser

Chrome

Configuration changes

No response

Other

I just updated redis today and since then it's not working anymore

stumpylog commented 11 months ago

You have a network/DNS problem at the very least. With maybe a system problem. It's not an issue with paperless.