jonaswinkler / paperless-ng

A supercharged version of paperless: scan, index and archive all your physical documents
https://paperless-ng.readthedocs.io/en/latest/
GNU General Public License v3.0
5.38k stars 354 forks source link

[BUG] Server Error (500) #716

Closed JohnPlayerSpecial closed 3 years ago

JohnPlayerSpecial commented 3 years ago

Describe the bug I am following tutorial here https://paperless-ng.readthedocs.io/en/latest/setup.html#setup-bare-metal (I have experience in linux and apache and python, but no prior to django) I DO NOT WANT OTHER INSTALLATION TYPES, BUT I WANT TO STICK WITH THIS, because I want to use Apache2. It seems it cannot create sqlite3 tables... how can I fix? Also, I would like to use postgresql, but it seems it is defaulting to sqlite3, why? I am on Ubuntu 20.04. I downloaded and I am using paperless-ng-1.3.0.tar.xz

I setup a vhost in Apache2.

<VirtualHost *:443>
                ServerAdmin MY_EMAIL@gmail.com
                ServerName paperless.mydomain.duckdns.org

                Alias /static/ /opt/paperless/static/
                <Directory /opt/paperless/static>
                    Require all granted
                </Directory>

                WSGIScriptAlias / /opt/paperless/src/paperless/wsgi.py
                WSGIDaemonProcess paperless.mydomain.duckdns.org user=paperless group=paperless threads=5 python-path=/opt/paperless/src:/opt/paperless/.local/lib/python3.8/site-packages
                WSGIProcessGroup paperless.mydomain.duckdns.org

                <Directory /opt/paperless/src/paperless>
                    <Files wsgi.py>
                        Require all granted
                    </Files>
                </Directory>

                SSLEngine on
                SSLCertificateFile   /etc/letsencrypt/live/mydomain.duckdns.org-0002/cert.pem
                SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.duckdns.org-0002/privkey.pem

                <FilesMatch "\.(cgi|shtml|phtml|php)$">
                                SSLOptions +StdEnvVars
                </FilesMatch>
                <Directory /usr/lib/cgi-bin>
                                SSLOptions +StdEnvVars
                </Directory>
                <Directory /opt/paperless/src/paperless>
                                SSLOptions +StdEnvVars
                </Directory>

                ErrorLog /var/log/apache2/paperless_error.log
                CustomLog /var/log/apache2/paperless_access.log combined

                BrowserMatch "MSIE [2-6]" \
                               nokeepalive ssl-unclean-shutdown \
                               downgrade-1.0 force-response-1.0

</VirtualHost>

my config is

# Have a look at the docs for documentation.
# https://paperless-ng.readthedocs.io/en/latest/configuration.html

# Debug. Only enable this for development.

#PAPERLESS_DEBUG=false

# Required services

PAPERLESS_REDIS=redis://localhost:6379
PAPERLESS_DBHOST=localhost
PAPERLESS_DBPORT=5432
PAPERLESS_DBNAME=paperless
PAPERLESS_DBUSER=paperless
PAPERLESS_DBPASS=PASSWORD
PAPERLESS_DBSSLMODE=prefer

# Paths and folders

PAPERLESS_CONSUMPTION_DIR=/opt/paperless/consume
PAPERLESS_DATA_DIR=/opt/paperless/data
PAPERLESS_MEDIA_ROOT=/opt/paperless/media
PAPERLESS_STATICDIR=/opt/paperless/static
PAPERLESS_FILENAME_FORMAT=

# Security and hosting

PAPERLESS_SECRET_KEY=I_INSERTED_A_LONG_RANDOM_STRING_AS_NEEDED
PAPERLESS_ALLOWED_HOSTS=https://paperless.mydomain.duckdns.org,https://www.paperless.mydomain.duckdns.org
PAPERLESS_CORS_ALLOWED_HOSTS=https://paperless.mydomain.duckdns.org,https://www.paperless.mydomain.duckdns.org,http://localhost:8000
#PAPERLESS_FORCE_SCRIPT_NAME=
#PAPERLESS_STATIC_URL=/static/
#PAPERLESS_AUTO_LOGIN_USERNAME=
#PAPERLESS_COOKIE_PREFIX=
#PAPERLESS_ENABLE_HTTP_REMOTE_USER=false

# OCR settings

PAPERLESS_OCR_LANGUAGE=ita
#PAPERLESS_OCR_MODE=skip
#PAPERLESS_OCR_OUTPUT_TYPE=pdfa
#PAPERLESS_OCR_PAGES=1
#PAPERLESS_OCR_IMAGE_DPI=300
#PAPERLESS_OCR_CLEAN=clean
#PAPERLESS_OCR_DESKEW=true
#PAPERLESS_OCR_ROTATE_PAGES=true
#PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD=12.0
#PAPERLESS_OCR_USER_ARGS={}
#PAPERLESS_CONVERT_MEMORY_LIMIT=0
#PAPERLESS_CONVERT_TMPDIR=/var/tmp/paperless

# Software tweaks

#PAPERLESS_TASK_WORKERS=1
#PAPERLESS_THREADS_PER_WORKER=1
#PAPERLESS_TIME_ZONE=UTC
#PAPERLESS_CONSUMER_POLLING=10
#PAPERLESS_CONSUMER_DELETE_DUPLICATES=false
#PAPERLESS_CONSUMER_RECURSIVE=false
#PAPERLESS_CONSUMER_SUBDIRS_AS_TAGS=false
#PAPERLESS_OPTIMIZE_THUMBNAILS=true
#PAPERLESS_POST_CONSUME_SCRIPT=/path/to/an/arbitrary/script.sh
#PAPERLESS_FILENAME_DATE_ORDER=YMD
#PAPERLESS_FILENAME_PARSE_TRANSFORMS=[]
#PAPERLESS_THUMBNAIL_FONT_NAME=
#PAPERLESS_IGNORE_DATES=

# Tika settings

PAPERLESS_TIKA_ENABLED=true
PAPERLESS_TIKA_ENDPOINT=http://localhost:9998
PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://localhost:3000

# Binaries

PAPERLESS_CONVERT_BINARY=/usr/bin/convert
PAPERLESS_GS_BINARY=/usr/bin/gs
PAPERLESS_OPTIPNG_BINARY=/usr/bin/optipng

when I give

sudo -Hu paperless python3 manage.py migrate

I receice

Operations to perform:
  Apply all migrations: admin, auth, authtoken, contenttypes, django_q, documents, paperless_mail, sessions
Running migrations:
  No migrations to apply.

To Reproduce went to https://mydomain.duckdns.org and logged in then 500 server error

Expected behavior Be able to login

Screenshots Not available

Webserver logs

[Sun Mar 07 16:20:13.416923 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] [2021-03-07 16:20:13,390] [ERROR] [django.request] Internal Server Error: /accounts/login/
[Sun Mar 07 16:20:13.416975 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] Traceback (most recent call last):
[Sun Mar 07 16:20:13.416980 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
[Sun Mar 07 16:20:13.416983 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return self.cursor.execute(sql, params)
[Sun Mar 07 16:20:13.416985 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 413, in execute
[Sun Mar 07 16:20:13.416988 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return Database.Cursor.execute(self, query, params)
[Sun Mar 07 16:20:13.416990 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] sqlite3.OperationalError: no such table: auth_user
[Sun Mar 07 16:20:13.416993 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] 
[Sun Mar 07 16:20:13.416995 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] The above exception was the direct cause of the following exception:
[Sun Mar 07 16:20:13.416998 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] 
[Sun Mar 07 16:20:13.417000 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] Traceback (most recent call last):
[Sun Mar 07 16:20:13.417002 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
[Sun Mar 07 16:20:13.417005 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     response = get_response(request)
[Sun Mar 07 16:20:13.417007 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
[Sun Mar 07 16:20:13.417010 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Sun Mar 07 16:20:13.417013 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
[Sun Mar 07 16:20:13.417015 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return self.dispatch(request, *args, **kwargs)
[Sun Mar 07 16:20:13.417017 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 43, in _wrapper
[Sun Mar 07 16:20:13.417020 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return bound_method(*args, **kwargs)
[Sun Mar 07 16:20:13.417023 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/decorators/debug.py", line 89, in sensitive_post_parameters_wrapper
[Sun Mar 07 16:20:13.417025 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return view(request, *args, **kwargs)
[Sun Mar 07 16:20:13.417027 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 43, in _wrapper
[Sun Mar 07 16:20:13.417030 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return bound_method(*args, **kwargs)
[Sun Mar 07 16:20:13.417032 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
[Sun Mar 07 16:20:13.417036 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     response = view_func(request, *args, **kwargs)
[Sun Mar 07 16:20:13.417039 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 43, in _wrapper
[Sun Mar 07 16:20:13.417060 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return bound_method(*args, **kwargs)
[Sun Mar 07 16:20:13.417064 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
[Sun Mar 07 16:20:13.417067 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     response = view_func(request, *args, **kwargs)
[Sun Mar 07 16:20:13.417071 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/views.py", line 63, in dispatch
[Sun Mar 07 16:20:13.417073 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return super().dispatch(request, *args, **kwargs)
[Sun Mar 07 16:20:13.417076 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/generic/base.py", line 98, in dispatch
[Sun Mar 07 16:20:13.417078 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return handler(request, *args, **kwargs)
[Sun Mar 07 16:20:13.417080 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/generic/edit.py", line 141, in post
[Sun Mar 07 16:20:13.417083 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     if form.is_valid():
[Sun Mar 07 16:20:13.417085 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 177, in is_valid
[Sun Mar 07 16:20:13.417088 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return self.is_bound and not self.errors
[Sun Mar 07 16:20:13.417090 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 172, in errors
[Sun Mar 07 16:20:13.417093 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     self.full_clean()
[Sun Mar 07 16:20:13.417095 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 375, in full_clean
[Sun Mar 07 16:20:13.417098 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     self._clean_form()
[Sun Mar 07 16:20:13.417100 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 402, in _clean_form
[Sun Mar 07 16:20:13.417102 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     cleaned_data = self.clean()
[Sun Mar 07 16:20:13.417105 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/forms.py", line 215, in clean
[Sun Mar 07 16:20:13.417107 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     self.user_cache = authenticate(self.request, username=username, password=password)
[Sun Mar 07 16:20:13.417110 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/__init__.py", line 73, in authenticate
[Sun Mar 07 16:20:13.417112 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     user = backend.authenticate(request, **credentials)
[Sun Mar 07 16:20:13.417115 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/backends.py", line 42, in authenticate
[Sun Mar 07 16:20:13.417117 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     user = UserModel._default_manager.get_by_natural_key(username)
[Sun Mar 07 16:20:13.417120 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 45, in get_by_natural_key
[Sun Mar 07 16:20:13.417124 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return self.get(**{self.model.USERNAME_FIELD: username})
[Sun Mar 07 16:20:13.417127 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
[Sun Mar 07 16:20:13.417129 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return getattr(self.get_queryset(), name)(*args, **kwargs)
[Sun Mar 07 16:20:13.417132 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 425, in get
[Sun Mar 07 16:20:13.417134 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     num = len(clone)
[Sun Mar 07 16:20:13.417137 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 269, in __len__
[Sun Mar 07 16:20:13.417139 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     self._fetch_all()
[Sun Mar 07 16:20:13.417141 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 1308, in _fetch_all
[Sun Mar 07 16:20:13.417144 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     self._result_cache = list(self._iterable_class(self))
[Sun Mar 07 16:20:13.417146 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 53, in __iter__
[Sun Mar 07 16:20:13.417149 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
[Sun Mar 07 16:20:13.417151 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql
[Sun Mar 07 16:20:13.417154 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     cursor.execute(sql, params)
[Sun Mar 07 16:20:13.417156 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
[Sun Mar 07 16:20:13.417159 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
[Sun Mar 07 16:20:13.417161 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
[Sun Mar 07 16:20:13.417164 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return executor(sql, params, many, context)
[Sun Mar 07 16:20:13.417166 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
[Sun Mar 07 16:20:13.417169 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return self.cursor.execute(sql, params)
[Sun Mar 07 16:20:13.417171 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
[Sun Mar 07 16:20:13.417173 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     raise dj_exc_value.with_traceback(traceback) from exc_value
[Sun Mar 07 16:20:13.417176 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
[Sun Mar 07 16:20:13.417178 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return self.cursor.execute(sql, params)
[Sun Mar 07 16:20:13.417181 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 413, in execute
[Sun Mar 07 16:20:13.417185 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337]     return Database.Cursor.execute(self, query, params)
[Sun Mar 07 16:20:13.417188 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:51337] django.db.utils.OperationalError: no such table: auth_user
[Sun Mar 07 16:32:36.526349 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] [2021-03-07 16:32:36,469] [ERROR] [django.request] Internal Server Error: /accounts/login/
[Sun Mar 07 16:32:36.526376 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] Traceback (most recent call last):
[Sun Mar 07 16:32:36.526380 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
[Sun Mar 07 16:32:36.526383 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return self.cursor.execute(sql, params)
[Sun Mar 07 16:32:36.526387 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 413, in execute
[Sun Mar 07 16:32:36.526390 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return Database.Cursor.execute(self, query, params)
[Sun Mar 07 16:32:36.526393 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] sqlite3.OperationalError: no such table: auth_user
[Sun Mar 07 16:32:36.526396 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] 
[Sun Mar 07 16:32:36.526399 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] The above exception was the direct cause of the following exception:
[Sun Mar 07 16:32:36.526402 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] 
[Sun Mar 07 16:32:36.526405 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] Traceback (most recent call last):
[Sun Mar 07 16:32:36.526408 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
[Sun Mar 07 16:32:36.526411 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     response = get_response(request)
[Sun Mar 07 16:32:36.526415 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
[Sun Mar 07 16:32:36.526418 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     response = wrapped_callback(request, *callback_args, **callback_kwargs)
[Sun Mar 07 16:32:36.526421 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/generic/base.py", line 70, in view
[Sun Mar 07 16:32:36.526424 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return self.dispatch(request, *args, **kwargs)
[Sun Mar 07 16:32:36.526428 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 43, in _wrapper
[Sun Mar 07 16:32:36.526431 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return bound_method(*args, **kwargs)
[Sun Mar 07 16:32:36.526434 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/decorators/debug.py", line 89, in sensitive_post_parameters_wrapper
[Sun Mar 07 16:32:36.526437 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return view(request, *args, **kwargs)
[Sun Mar 07 16:32:36.526441 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 43, in _wrapper
[Sun Mar 07 16:32:36.526444 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return bound_method(*args, **kwargs)
[Sun Mar 07 16:32:36.526447 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 130, in _wrapped_view
[Sun Mar 07 16:32:36.526464 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     response = view_func(request, *args, **kwargs)
[Sun Mar 07 16:32:36.526467 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/utils/decorators.py", line 43, in _wrapper
[Sun Mar 07 16:32:36.526470 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return bound_method(*args, **kwargs)
[Sun Mar 07 16:32:36.526472 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/decorators/cache.py", line 44, in _wrapped_view_func
[Sun Mar 07 16:32:36.526475 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     response = view_func(request, *args, **kwargs)
[Sun Mar 07 16:32:36.526478 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/views.py", line 63, in dispatch
[Sun Mar 07 16:32:36.526481 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return super().dispatch(request, *args, **kwargs)
[Sun Mar 07 16:32:36.526484 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/generic/base.py", line 98, in dispatch
[Sun Mar 07 16:32:36.526487 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return handler(request, *args, **kwargs)
[Sun Mar 07 16:32:36.526489 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/views/generic/edit.py", line 141, in post
[Sun Mar 07 16:32:36.526492 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     if form.is_valid():
[Sun Mar 07 16:32:36.526495 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 177, in is_valid
[Sun Mar 07 16:32:36.526498 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return self.is_bound and not self.errors
[Sun Mar 07 16:32:36.526500 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 172, in errors
[Sun Mar 07 16:32:36.526503 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     self.full_clean()
[Sun Mar 07 16:32:36.526506 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 375, in full_clean
[Sun Mar 07 16:32:36.526509 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     self._clean_form()
[Sun Mar 07 16:32:36.526511 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/forms/forms.py", line 402, in _clean_form
[Sun Mar 07 16:32:36.526514 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     cleaned_data = self.clean()
[Sun Mar 07 16:32:36.526517 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/forms.py", line 215, in clean
[Sun Mar 07 16:32:36.526520 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     self.user_cache = authenticate(self.request, username=username, password=password)
[Sun Mar 07 16:32:36.526522 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/__init__.py", line 73, in authenticate
[Sun Mar 07 16:32:36.526525 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     user = backend.authenticate(request, **credentials)
[Sun Mar 07 16:32:36.526528 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/backends.py", line 42, in authenticate
[Sun Mar 07 16:32:36.526534 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     user = UserModel._default_manager.get_by_natural_key(username)
[Sun Mar 07 16:32:36.526536 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/contrib/auth/base_user.py", line 45, in get_by_natural_key
[Sun Mar 07 16:32:36.526539 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return self.get(**{self.model.USERNAME_FIELD: username})
[Sun Mar 07 16:32:36.526542 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/manager.py", line 85, in manager_method
[Sun Mar 07 16:32:36.526545 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return getattr(self.get_queryset(), name)(*args, **kwargs)
[Sun Mar 07 16:32:36.526548 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 425, in get
[Sun Mar 07 16:32:36.526551 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     num = len(clone)
[Sun Mar 07 16:32:36.526554 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 269, in __len__
[Sun Mar 07 16:32:36.526556 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     self._fetch_all()
[Sun Mar 07 16:32:36.526559 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 1308, in _fetch_all
[Sun Mar 07 16:32:36.526562 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     self._result_cache = list(self._iterable_class(self))
[Sun Mar 07 16:32:36.526565 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/query.py", line 53, in __iter__
[Sun Mar 07 16:32:36.526567 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     results = compiler.execute_sql(chunked_fetch=self.chunked_fetch, chunk_size=self.chunk_size)
[Sun Mar 07 16:32:36.526570 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/models/sql/compiler.py", line 1156, in execute_sql
[Sun Mar 07 16:32:36.526573 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     cursor.execute(sql, params)
[Sun Mar 07 16:32:36.526576 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 66, in execute
[Sun Mar 07 16:32:36.526579 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return self._execute_with_wrappers(sql, params, many=False, executor=self._execute)
[Sun Mar 07 16:32:36.526582 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 75, in _execute_with_wrappers
[Sun Mar 07 16:32:36.526585 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return executor(sql, params, many, context)
[Sun Mar 07 16:32:36.526587 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
[Sun Mar 07 16:32:36.526590 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return self.cursor.execute(sql, params)
[Sun Mar 07 16:32:36.526593 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
[Sun Mar 07 16:32:36.526596 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     raise dj_exc_value.with_traceback(traceback) from exc_value
[Sun Mar 07 16:32:36.526598 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/utils.py", line 84, in _execute
[Sun Mar 07 16:32:36.526603 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return self.cursor.execute(sql, params)
[Sun Mar 07 16:32:36.526606 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]   File "/opt/paperless/.local/lib/python3.8/site-packages/django/db/backends/sqlite3/base.py", line 413, in execute
[Sun Mar 07 16:32:36.526609 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887]     return Database.Cursor.execute(self, query, params)
[Sun Mar 07 16:32:36.526612 2021] [wsgi:error] [pid 164240] [remote MY_ACTUAL_PUBLIC_IP:59887] django.db.utils.OperationalError: no such table: auth_user

Relevant information

Thanks

jonaswinkler commented 3 years ago

It seems it cannot create sqlite3 tables...

As soon as you specify PAPERLESS_DBHOST it will switch from sqlite to postgresql. If you still see the sqlite database being created by the migrate command, then your configuration file is not being read by that command.

WSGIScriptAlias / /opt/paperless/src/paperless/wsgi.py

Please note that document consumption status notifications won't be available without an ASGI-enabled server. mod_wsgi can't do that.

my config is

Looks good to me; where is your configuration file stored?