Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'psycopg2' even though it's installed #1

Open
sirus20x6 opened this issue May 11, 2023 · 4 comments

Comments

@sirus20x6
Copy link

sudo systemctl status authentik-server
● authentik-server.service - Authentik Server (web/api/sso)
     Loaded: loaded (/etc/systemd/system/authentik-server.service; disabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2023-05-11 11:04:24 -01; 3s ago
    Process: 727765 ExecStart=/bin/bash -c source /opt/authentik/src/.venv/bin/activate && python -m lifecycle.migrate && /opt/authentik/src/authentik-server (code=exited, status=1/FAILURE)
   Main PID: 727765 (code=exited, status=1/FAILURE)
        CPU: 45ms

May 11 11:04:24 ds10243 bash[727768]:     from psycopg2 import connect
May 11 11:04:24 ds10243 bash[727768]: ModuleNotFoundError: No module named 'psycopg2'
May 11 11:04:24 ds10243 systemd[1]: authentik-server.service: Main process exited, code=exited, status=1/FAILURE
May 11 11:04:24 ds10243 systemd[1]: authentik-server.service: Failed with result 'exit-code'.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy

sirus@ds10243:~$ sudo apt install python3-psycopg2
[sudo] password for sirus: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-psycopg2 is already the newest version (2.9.2-1build2).
The following packages were automatically installed and are no longer required:
  gyp libevent-pthreads-2.1-7 libjs-events libjs-highlight.js libjs-inherits libjs-is-typedarray libjs-psl libjs-source-map libjs-sprintf-js libjs-typedarray-to-buffer libnode-dev libopts25
  libuv1-dev node-abab node-abbrev node-agent-base node-ansi-regex node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet node-argparse node-arrify node-asap
  node-asynckit node-balanced-match node-brace-expansion node-builtins node-chalk node-chownr node-clean-yaml-object node-cli-table node-clone node-color-convert node-color-name node-colors
  node-columnify node-combined-stream node-commander node-console-control-strings node-core-util-is node-cssom node-cssstyle node-debug node-decompress-response node-defaults
  node-delayed-stream node-delegates node-depd node-diff node-encoding node-end-of-stream node-err-code node-escape-string-regexp node-events node-fancy-log node-foreground-child
  node-fs-write-stream-atomic node-fs.realpath node-function-bind node-gauge node-get-stream node-glob node-got node-graceful-fs node-growl node-has-flag node-has-unicode
  node-hosted-git-info node-https-proxy-agent node-iconv-lite node-iferr node-imurmurhash node-indent-string node-inflight node-inherits node-ini node-ip node-ip-regex node-is-buffer
  node-is-plain-obj node-is-typedarray node-isarray node-isexe node-json-buffer node-json-parse-better-errors node-jsonparse node-kind-of node-lcov-parse node-lodash-packages
  node-log-driver node-lowercase-keys node-lru-cache node-mimic-response node-minimatch node-minimist node-minipass node-ms node-mute-stream node-negotiator node-normalize-package-data
  node-npm-bundled node-npm-package-arg node-npmlog node-object-assign node-once node-osenv node-p-cancelable node-p-map node-path-is-absolute node-process-nextick-args
  node-promise-inflight node-promise-retry node-promzard node-psl node-pump node-punycode node-quick-lru node-read node-read-package-json node-readable-stream node-resolve node-retry
  node-rimraf node-run-queue node-safe-buffer node-semver node-set-blocking node-signal-exit node-slash node-slice-ansi node-source-map node-source-map-support node-spdx-correct
  node-spdx-exceptions node-spdx-expression-parse node-spdx-license-ids node-sprintf-js node-ssri node-stack-utils node-stealthy-require node-string-decoder node-string-width
  node-strip-ansi node-supports-color node-text-table node-time-stamp node-tmatch node-tough-cookie node-typedarray-to-buffer node-unique-filename node-universalify node-util-deprecate
  node-validate-npm-package-license node-validate-npm-package-name node-wcwidth.js node-webidl-conversions node-whatwg-fetch node-wide-align node-wrappy node-write-file-atomic node-yallist
  sntp
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
@information-redacted
Copy link
Collaborator

information-redacted commented May 11, 2023

Hey, can you verify that all dependencies are installed in the virtualenv (/opt/authentik/src/.venv/) instead of system-wide?

@sirus20x6
Copy link
Author

it does appear to be a problem with the vritual env. if I source it and then try to pip install psycogp2 i get

(.venv) sirus@ds10243:/opt/authentik/src$ pip install psycogp2
ERROR: Could not find a version that satisfies the requirement psycogp2 (from versions: none)
ERROR: No matching distribution found for psycogp2

I was able to work around that particular one with the binary, but it seems pip is having struggles

(.venv) sirus@ds10243:/opt/authentik/src$ pip install psycopg2-binary
Collecting psycopg2-binary
  Downloading psycopg2_binary-2.9.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.0/3.0 MB 26.1 MB/s eta 0:00:00
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.9.6
(.venv) sirus@ds10243:/opt/authentik/src$ python -m lifecycle.migrate
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/authentik/src/lifecycle/migrate.py", line 10, in <module>
    from structlog.stdlib import get_logger
ModuleNotFoundError: No module named 'structlog'
(.venv) sirus@ds10243:/opt/authentik/src$ pip install structlog
Collecting structlog
  Downloading structlog-23.1.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.4/62.4 kB 1.2 MB/s eta 0:00:00
Installing collected packages: structlog
Successfully installed structlog-23.1.0
(.venv) sirus@ds10243:/opt/authentik/src$ python -m lifecycle.migrate
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/opt/authentik/src/lifecycle/migrate.py", line 12, in <module>
    from authentik.lib.config import CONFIG
  File "/opt/authentik/src/authentik/lib/config.py", line 13, in <module>
    import yaml
ModuleNotFoundError: No module named 'yaml'
(.venv) sirus@ds10243:/opt/authentik/src$ pip install yaml
ERROR: Could not find a version that satisfies the requirement yaml (from versions: none)
ERROR: No matching distribution found for yaml

@information-redacted
Copy link
Collaborator

Instead of installing the dependencies manually, you should try to install them as per the script;
While in the venv, run:

pip install --no-cache-dir poetry
poetry export -f requirements.txt --output requirements.txt
poetry export -f requirements.txt --dev --output requirements-dev.txt

pip install --no-cache-dir -r requirements.txt -r requirements-dev.txt

(Taken from https://github.com/information-redacted/authentik-bare-metal/blob/305b80844acc4261c67716175384f5807f57f0de/03_clone.sh#LL11C1-L15C71)

@sirus20x6
Copy link
Author

that seemed to work,but now I'm wondering why it didnt work with the script the first time. was I not supposed to run script 0 with sudo?

if not then I should probably start the installation over again as I'm getting permission errors and http://---:9000/if/flow/initial-setup just shows

authentik starting...

● authentik-server.service - Authentik Server (web/api/sso)
     Loaded: loaded (/etc/systemd/system/authentik-server.service; disabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-05-11 14:07:35 -01; 1min 44s ago
   Main PID: 760651 (authentik-serve)
      Tasks: 19 (limit: 38347)
     Memory: 239.0M
        CPU: 1min 10.306s
     CGroup: /system.slice/authentik-server.service
             ├─760651 /opt/authentik/src/authentik-server
             └─761039 /opt/authentik/src/.venv/bin/python /opt/authentik/src/.venv/bin/gunicorn -c ./lifecycle/gunicorn.conf.py authentik.root.asgi:application

May 11 14:09:20 ds10243 bash[761039]: │ ╰───────────────────────────────────────────────────────────────────────╯    │
May 11 14:09:20 ds10243 bash[761039]: ╰──────────────────────────────────────────────────────────────────────────────╯
May 11 14:09:20 ds10243 bash[761039]: PermissionError: [Errno 13] Permission denied:
May 11 14:09:20 ds10243 bash[761039]: '/tmp/authentik_worker_tmp/wgunicorn-w3u9_s6l'
May 11 14:09:20 ds10243 bash[760651]: {"error":"exit status 255","event":"gunicorn process died, restarting","level":"warning","logger":"authentik.router","timestamp":"2023-05-11T14:09:20-0>
May 11 14:09:21 ds10243 bash[761044]: {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1683817761.478264, "file": "/opt/authentik/src/authentik/li>
May 11 14:09:21 ds10243 bash[761044]: {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1683817761.4849548, "file": "/etc/authentik/config.yml"}
May 11 14:09:21 ds10243 bash[761044]: 1683817761.6595874 [info     ] Starting gunicorn 20.1.0       [gunicorn.error]
May 11 14:09:21 ds10243 bash[761044]: 1683817761.660192 [info     ] Listening at: http://127.0.0.1:8000 (761044) [gunicorn.error]
May 11 14:09:21 ds10243 bash[761044]: 1683817761.6603026 [info     ] Using worker: lifecycle.worker.DjangoUvicornWorker [gunicorn.error]
May 11 14:09:22 ds10243 bash[761044]: 1683817761.660572 [info     ] Unhandled exception in main loop [gunicorn.error]
May 11 14:09:22 ds10243 bash[761044]: ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
May 11 14:09:22 ds10243 bash[761044]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:20 │
May 11 14:09:22 ds10243 bash[761044]: │ 2 in run                                                                     │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   199 │   │   util._setproctitle("master [%s]" % self.proc_name)             │
May 11 14:09:22 ds10243 bash[761044]: │   200 │   │                                                                  │
May 11 14:09:22 ds10243 bash[761044]: │   201 │   │   try:                                                           │
May 11 14:09:22 ds10243 bash[761044]: │ ❱ 202 │   │   │   self.manage_workers()                                      │
May 11 14:09:22 ds10243 bash[761044]: │   203 │   │   │                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   204 │   │   │   while True:                                                │
May 11 14:09:22 ds10243 bash[761044]: │   205 │   │   │   │   self.maybe_promote_master()                            │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:22 ds10243 bash[761044]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7facce720610> │               │
May 11 14:09:22 ds10243 bash[761044]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:55 │
May 11 14:09:22 ds10243 bash[761044]: │ 1 in manage_workers                                                          │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   548 │   │   as required.                                                   │
May 11 14:09:22 ds10243 bash[761044]: │   549 │   │   """                                                            │
May 11 14:09:22 ds10243 bash[761044]: │   550 │   │   if len(self.WORKERS) < self.num_workers:                       │
May 11 14:09:22 ds10243 bash[761044]: │ ❱ 551 │   │   │   self.spawn_workers()                                       │
May 11 14:09:22 ds10243 bash[761044]: │   552 │   │                                                                  │
May 11 14:09:22 ds10243 bash[761044]: │   553 │   │   workers = self.WORKERS.items()                                 │
May 11 14:09:22 ds10243 bash[761044]: │   554 │   │   workers = sorted(workers, key=lambda w: w[1].age)              │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:22 ds10243 bash[761044]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7facce720610> │               │
May 11 14:09:22 ds10243 bash[761044]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:62 │
May 11 14:09:22 ds10243 bash[761044]: │ 2 in spawn_workers                                                           │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   619 │   │   """                                                            │
May 11 14:09:22 ds10243 bash[761044]: │   620 │   │                                                                  │
May 11 14:09:22 ds10243 bash[761044]: │   621 │   │   for _ in range(self.num_workers - len(self.WORKERS)):          │
May 11 14:09:22 ds10243 bash[761044]: │ ❱ 622 │   │   │   self.spawn_worker()                                        │
May 11 14:09:22 ds10243 bash[761044]: │   623 │   │   │   time.sleep(0.1 * random.random())                          │
May 11 14:09:22 ds10243 bash[761044]: │   624 │                                                                      │
May 11 14:09:22 ds10243 bash[761044]: │   625 │   def kill_workers(self, sig):                                       │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:22 ds10243 bash[761044]: │ │    _ = 0                                                   │               │
May 11 14:09:22 ds10243 bash[761044]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7facce720610> │               │
May 11 14:09:22 ds10243 bash[761044]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:56 │
May 11 14:09:22 ds10243 bash[761044]: │ 9 in spawn_worker                                                            │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   566 │                                                                      │
May 11 14:09:22 ds10243 bash[761044]: │   567 │   def spawn_worker(self):                                            │
May 11 14:09:22 ds10243 bash[761044]: │   568 │   │   self.worker_age += 1                                           │
May 11 14:09:22 ds10243 bash[761044]: │ ❱ 569 │   │   worker = self.worker_class(self.worker_age, self.pid, self.LIS │
May 11 14:09:22 ds10243 bash[761044]: │   570 │   │   │   │   │   │   │   │      self.app, self.timeout / 2.0,       │
May 11 14:09:22 ds10243 bash[761044]: │   571 │   │   │   │   │   │   │   │      self.cfg, self.log)                 │
May 11 14:09:22 ds10243 bash[761044]: │   572 │   │   self.cfg.pre_fork(self, worker)                                │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:22 ds10243 bash[761044]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7facce720610> │               │
May 11 14:09:22 ds10243 bash[761044]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/uvicorn/workers.py:23  │
May 11 14:09:22 ds10243 bash[761044]: │ in __init__                                                                  │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │    20 │   CONFIG_KWARGS: Dict[str, Any] = {"loop": "auto", "http": "auto"}   │
May 11 14:09:22 ds10243 bash[761044]: │    21 │                                                                      │
May 11 14:09:22 ds10243 bash[761044]: │    22 │   def __init__(self, *args: Any, **kwargs: Any) -> None:             │
May 11 14:09:22 ds10243 bash[761044]: │ ❱  23 │   │   super(UvicornWorker, self).__init__(*args, **kwargs)           │
May 11 14:09:22 ds10243 bash[761044]: │    24 │   │                                                                  │
May 11 14:09:22 ds10243 bash[761044]: │    25 │   │   logger = logging.getLogger("uvicorn.error")                    │
May 11 14:09:22 ds10243 bash[761044]: │    26 │   │   logger.handlers = self.log.error_log.handlers                  │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
May 11 14:09:22 ds10243 bash[761044]: │ │   args = (                                                               │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          │   1,                                                          │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          │   761044,                                                     │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          │   [<gunicorn.sock.TCPSocket object at 0x7faccabdd690>],       │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          │   <gunicorn.app.wsgiapp.WSGIApplication object at             │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          0x7facce9b0710>,                                                │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          │   15.0,                                                       │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          │   <gunicorn.config.Config object at 0x7facce0e5ad0>,          │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          │   <gunicorn.glogging.Logger object at 0x7facce8fbad0>         │ │
May 11 14:09:22 ds10243 bash[761044]: │ │          )                                                               │ │
May 11 14:09:22 ds10243 bash[761044]: │ │ kwargs = {}                                                              │ │
May 11 14:09:22 ds10243 bash[761044]: │ │   self = <lifecycle.worker.DjangoUvicornWorker object at 0x7faccabdd7d0> │ │
May 11 14:09:22 ds10243 bash[761044]: │ ╰──────────────────────────────────────────────────────────────────────────╯ │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/workers/base. │
May 11 14:09:22 ds10243 bash[761044]: │ py:64 in __init__                                                            │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │    61 │   │                                                                  │
May 11 14:09:22 ds10243 bash[761044]: │    62 │   │   self.alive = True                                              │
May 11 14:09:22 ds10243 bash[761044]: │    63 │   │   self.log = log                                                 │
May 11 14:09:22 ds10243 bash[761044]: │ ❱  64 │   │   self.tmp = WorkerTmp(cfg)                                      │
May 11 14:09:22 ds10243 bash[761044]: │    65 │                                                                      │
May 11 14:09:22 ds10243 bash[761044]: │    66 │   def __str__(self):                                                 │
May 11 14:09:22 ds10243 bash[761044]: │    67 │   │   return "<Worker %s>" % self.pid                                │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
May 11 14:09:22 ds10243 bash[761044]: │ │     age = 1                                                              │ │
May 11 14:09:22 ds10243 bash[761044]: │ │     app = <gunicorn.app.wsgiapp.WSGIApplication object at                │ │
May 11 14:09:22 ds10243 bash[761044]: │ │           0x7facce9b0710>                                                │ │
May 11 14:09:22 ds10243 bash[761044]: │ │     cfg = <gunicorn.config.Config object at 0x7facce0e5ad0>              │ │
May 11 14:09:22 ds10243 bash[761044]: │ │  jitter = 11                                                             │ │
May 11 14:09:22 ds10243 bash[761044]: │ │     log = <gunicorn.glogging.Logger object at 0x7facce8fbad0>            │ │
May 11 14:09:22 ds10243 bash[761044]: │ │    ppid = 761044                                                         │ │
May 11 14:09:22 ds10243 bash[761044]: │ │    self = <lifecycle.worker.DjangoUvicornWorker object at                │ │
May 11 14:09:22 ds10243 bash[761044]: │ │           0x7faccabdd7d0>                                                │ │
May 11 14:09:22 ds10243 bash[761044]: │ │ sockets = [<gunicorn.sock.TCPSocket object at 0x7faccabdd690>]           │ │
May 11 14:09:22 ds10243 bash[761044]: │ │ timeout = 15.0                                                           │ │
May 11 14:09:22 ds10243 bash[761044]: │ ╰──────────────────────────────────────────────────────────────────────────╯ │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/workers/worke │
May 11 14:09:22 ds10243 bash[761044]: │ rtmp.py:23 in __init__                                                       │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   20 │   │   fdir = cfg.worker_tmp_dir                                       │
May 11 14:09:22 ds10243 bash[761044]: │   21 │   │   if fdir and not os.path.isdir(fdir):                            │
May 11 14:09:22 ds10243 bash[761044]: │   22 │   │   │   raise RuntimeError("%s doesn't exist. Can't create workertm │
May 11 14:09:22 ds10243 bash[761044]: │ ❱ 23 │   │   fd, name = tempfile.mkstemp(prefix="wgunicorn-", dir=fdir)      │
May 11 14:09:22 ds10243 bash[761044]: │   24 │   │   os.umask(old_umask)                                             │
May 11 14:09:22 ds10243 bash[761044]: │   25 │   │                                                                   │
May 11 14:09:22 ds10243 bash[761044]: │   26 │   │   # change the owner and group of the file if the worker will run │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
May 11 14:09:22 ds10243 bash[761044]: │ │       cfg = <gunicorn.config.Config object at 0x7facce0e5ad0>            │ │
May 11 14:09:22 ds10243 bash[761044]: │ │      fdir = '/tmp/authentik_worker_tmp'                                  │ │
May 11 14:09:22 ds10243 bash[761044]: │ │ old_umask = 18                                                           │ │
May 11 14:09:22 ds10243 bash[761044]: │ │      self = <gunicorn.workers.workertmp.WorkerTmp object at              │ │
May 11 14:09:22 ds10243 bash[761044]: │ │             0x7faccc147490>                                              │ │
May 11 14:09:22 ds10243 bash[761044]: │ ╰──────────────────────────────────────────────────────────────────────────╯ │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /usr/local/lib/python3.11/tempfile.py:341 in mkstemp                         │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   338 │   else:                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   339 │   │   flags = _bin_openflags                                         │
May 11 14:09:22 ds10243 bash[761044]: │   340 │                                                                      │
May 11 14:09:22 ds10243 bash[761044]: │ ❱ 341 │   return _mkstemp_inner(dir, prefix, suffix, flags, output_type)     │
May 11 14:09:22 ds10243 bash[761044]: │   342                                                                        │
May 11 14:09:22 ds10243 bash[761044]: │   343                                                                        │
May 11 14:09:22 ds10243 bash[761044]: │   344 def mkdtemp(suffix=None, prefix=None, dir=None):                       │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭───────────────── locals ──────────────────╮                                │
May 11 14:09:22 ds10243 bash[761044]: │ │         dir = '/tmp/authentik_worker_tmp' │                                │
May 11 14:09:22 ds10243 bash[761044]: │ │       flags = 131266                      │                                │
May 11 14:09:22 ds10243 bash[761044]: │ │ output_type = <class 'str'>               │                                │
May 11 14:09:22 ds10243 bash[761044]: │ │      prefix = 'wgunicorn-'                │                                │
May 11 14:09:22 ds10243 bash[761044]: │ │      suffix = ''                          │                                │
May 11 14:09:22 ds10243 bash[761044]: │ │        text = False                       │                                │
May 11 14:09:22 ds10243 bash[761044]: │ ╰───────────────────────────────────────────╯                                │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ /usr/local/lib/python3.11/tempfile.py:256 in _mkstemp_inner                  │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │   253 │   │   file = _os.path.join(dir, pre + name + suf)                    │
May 11 14:09:22 ds10243 bash[761044]: │   254 │   │   _sys.audit("tempfile.mkstemp", file)                           │
May 11 14:09:22 ds10243 bash[761044]: │   255 │   │   try:                                                           │
May 11 14:09:22 ds10243 bash[761044]: │ ❱ 256 │   │   │   fd = _os.open(file, flags, 0o600)                          │
May 11 14:09:22 ds10243 bash[761044]: │   257 │   │   except FileExistsError:                                        │
May 11 14:09:22 ds10243 bash[761044]: │   258 │   │   │   continue    # try again                                    │
May 11 14:09:22 ds10243 bash[761044]: │   259 │   │   except PermissionError:                                        │
May 11 14:09:22 ds10243 bash[761044]: │                                                                              │
May 11 14:09:22 ds10243 bash[761044]: │ ╭─────────────────────────────── locals ────────────────────────────────╮    │
May 11 14:09:22 ds10243 bash[761044]: │ │         dir = '/tmp/authentik_worker_tmp'                             │    │
May 11 14:09:22 ds10243 bash[761044]: │ │        file = '/tmp/authentik_worker_tmp/wgunicorn-_k39hxm0'          │    │
May 11 14:09:22 ds10243 bash[761044]: │ │       flags = 131266                                                  │    │
May 11 14:09:22 ds10243 bash[761044]: │ │        name = '_k39hxm0'                                              │    │
May 11 14:09:22 ds10243 bash[761044]: │ │       names = <tempfile._RandomNameSequence object at 0x7faccabdd890> │    │
May 11 14:09:22 ds10243 bash[761044]: │ │ output_type = <class 'str'>                                           │    │
May 11 14:09:22 ds10243 bash[761044]: │ │         pre = 'wgunicorn-'                                            │    │
May 11 14:09:22 ds10243 bash[761044]: │ │         seq = 0                                                       │    │
May 11 14:09:22 ds10243 bash[761044]: │ │         suf = ''                                                      │    │
May 11 14:09:22 ds10243 bash[761044]: │ ╰───────────────────────────────────────────────────────────────────────╯    │
May 11 14:09:22 ds10243 bash[761044]: ╰──────────────────────────────────────────────────────────────────────────────╯
May 11 14:09:22 ds10243 bash[761044]: PermissionError: [Errno 13] Permission denied:
May 11 14:09:22 ds10243 bash[761044]: '/tmp/authentik_worker_tmp/wgunicorn-_k39hxm0'
May 11 14:09:22 ds10243 bash[760651]: {"error":"exit status 255","event":"gunicorn process died, restarting","level":"warning","logger":"authentik.router","timestamp":"2023-05-11T14:09:22-0>
May 11 14:09:22 ds10243 bash[761045]: {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1683817762.9195843, "file": "/opt/authentik/src/authentik/l>
May 11 14:09:22 ds10243 bash[761045]: {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1683817762.9272134, "file": "/etc/authentik/config.yml"}
May 11 14:09:23 ds10243 bash[761045]: 1683817763.092439 [info     ] Starting gunicorn 20.1.0       [gunicorn.error]
May 11 14:09:23 ds10243 bash[761045]: 1683817763.0930452 [info     ] Listening at: http://127.0.0.1:8000 (761045) [gunicorn.error]
May 11 14:09:23 ds10243 bash[761045]: 1683817763.0931551 [info     ] Using worker: lifecycle.worker.DjangoUvicornWorker [gunicorn.error]
May 11 14:09:23 ds10243 bash[761045]: 1683817763.0934076 [info     ] Unhandled exception in main loop [gunicorn.error]
May 11 14:09:23 ds10243 bash[761045]: ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
May 11 14:09:23 ds10243 bash[761045]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:20 │
May 11 14:09:23 ds10243 bash[761045]: │ 2 in run                                                                     │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   199 │   │   util._setproctitle("master [%s]" % self.proc_name)             │
May 11 14:09:23 ds10243 bash[761045]: │   200 │   │                                                                  │
May 11 14:09:23 ds10243 bash[761045]: │   201 │   │   try:                                                           │
May 11 14:09:23 ds10243 bash[761045]: │ ❱ 202 │   │   │   self.manage_workers()                                      │
May 11 14:09:23 ds10243 bash[761045]: │   203 │   │   │                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   204 │   │   │   while True:                                                │
May 11 14:09:23 ds10243 bash[761045]: │   205 │   │   │   │   self.maybe_promote_master()                            │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:23 ds10243 bash[761045]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7f8d8f126dd0> │               │
May 11 14:09:23 ds10243 bash[761045]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:55 │
May 11 14:09:23 ds10243 bash[761045]: │ 1 in manage_workers                                                          │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   548 │   │   as required.                                                   │
May 11 14:09:23 ds10243 bash[761045]: │   549 │   │   """                                                            │
May 11 14:09:23 ds10243 bash[761045]: │   550 │   │   if len(self.WORKERS) < self.num_workers:                       │
May 11 14:09:23 ds10243 bash[761045]: │ ❱ 551 │   │   │   self.spawn_workers()                                       │
May 11 14:09:23 ds10243 bash[761045]: │   552 │   │                                                                  │
May 11 14:09:23 ds10243 bash[761045]: │   553 │   │   workers = self.WORKERS.items()                                 │
May 11 14:09:23 ds10243 bash[761045]: │   554 │   │   workers = sorted(workers, key=lambda w: w[1].age)              │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:23 ds10243 bash[761045]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7f8d8f126dd0> │               │
May 11 14:09:23 ds10243 bash[761045]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:62 │
May 11 14:09:23 ds10243 bash[761045]: │ 2 in spawn_workers                                                           │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   619 │   │   """                                                            │
May 11 14:09:23 ds10243 bash[761045]: │   620 │   │                                                                  │
May 11 14:09:23 ds10243 bash[761045]: │   621 │   │   for _ in range(self.num_workers - len(self.WORKERS)):          │
May 11 14:09:23 ds10243 bash[761045]: │ ❱ 622 │   │   │   self.spawn_worker()                                        │
May 11 14:09:23 ds10243 bash[761045]: │   623 │   │   │   time.sleep(0.1 * random.random())                          │
May 11 14:09:23 ds10243 bash[761045]: │   624 │                                                                      │
May 11 14:09:23 ds10243 bash[761045]: │   625 │   def kill_workers(self, sig):                                       │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:23 ds10243 bash[761045]: │ │    _ = 0                                                   │               │
May 11 14:09:23 ds10243 bash[761045]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7f8d8f126dd0> │               │
May 11 14:09:23 ds10243 bash[761045]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:56 │
May 11 14:09:23 ds10243 bash[761045]: │ 9 in spawn_worker                                                            │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   566 │                                                                      │
May 11 14:09:23 ds10243 bash[761045]: │   567 │   def spawn_worker(self):                                            │
May 11 14:09:23 ds10243 bash[761045]: │   568 │   │   self.worker_age += 1                                           │
May 11 14:09:23 ds10243 bash[761045]: │ ❱ 569 │   │   worker = self.worker_class(self.worker_age, self.pid, self.LIS │
May 11 14:09:23 ds10243 bash[761045]: │   570 │   │   │   │   │   │   │   │      self.app, self.timeout / 2.0,       │
May 11 14:09:23 ds10243 bash[761045]: │   571 │   │   │   │   │   │   │   │      self.cfg, self.log)                 │
May 11 14:09:23 ds10243 bash[761045]: │   572 │   │   self.cfg.pre_fork(self, worker)                                │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:23 ds10243 bash[761045]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7f8d8f126dd0> │               │
May 11 14:09:23 ds10243 bash[761045]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/uvicorn/workers.py:23  │
May 11 14:09:23 ds10243 bash[761045]: │ in __init__                                                                  │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │    20 │   CONFIG_KWARGS: Dict[str, Any] = {"loop": "auto", "http": "auto"}   │
May 11 14:09:23 ds10243 bash[761045]: │    21 │                                                                      │
May 11 14:09:23 ds10243 bash[761045]: │    22 │   def __init__(self, *args: Any, **kwargs: Any) -> None:             │
May 11 14:09:23 ds10243 bash[761045]: │ ❱  23 │   │   super(UvicornWorker, self).__init__(*args, **kwargs)           │
May 11 14:09:23 ds10243 bash[761045]: │    24 │   │                                                                  │
May 11 14:09:23 ds10243 bash[761045]: │    25 │   │   logger = logging.getLogger("uvicorn.error")                    │
May 11 14:09:23 ds10243 bash[761045]: │    26 │   │   logger.handlers = self.log.error_log.handlers                  │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
May 11 14:09:23 ds10243 bash[761045]: │ │   args = (                                                               │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          │   1,                                                          │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          │   761045,                                                     │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          │   [<gunicorn.sock.TCPSocket object at 0x7f8d8e8e19d0>],       │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          │   <gunicorn.app.wsgiapp.WSGIApplication object at             │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          0x7f8d92758bd0>,                                                │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          │   15.0,                                                       │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          │   <gunicorn.config.Config object at 0x7f8d91f68ad0>,          │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          │   <gunicorn.glogging.Logger object at 0x7f8d91e5aa10>         │ │
May 11 14:09:23 ds10243 bash[761045]: │ │          )                                                               │ │
May 11 14:09:23 ds10243 bash[761045]: │ │ kwargs = {}                                                              │ │
May 11 14:09:23 ds10243 bash[761045]: │ │   self = <lifecycle.worker.DjangoUvicornWorker object at 0x7f8d8e8e1b10> │ │
May 11 14:09:23 ds10243 bash[761045]: │ ╰──────────────────────────────────────────────────────────────────────────╯ │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/workers/base. │
May 11 14:09:23 ds10243 bash[761045]: │ py:64 in __init__                                                            │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │    61 │   │                                                                  │
May 11 14:09:23 ds10243 bash[761045]: │    62 │   │   self.alive = True                                              │
May 11 14:09:23 ds10243 bash[761045]: │    63 │   │   self.log = log                                                 │
May 11 14:09:23 ds10243 bash[761045]: │ ❱  64 │   │   self.tmp = WorkerTmp(cfg)                                      │
May 11 14:09:23 ds10243 bash[761045]: │    65 │                                                                      │
May 11 14:09:23 ds10243 bash[761045]: │    66 │   def __str__(self):                                                 │
May 11 14:09:23 ds10243 bash[761045]: │    67 │   │   return "<Worker %s>" % self.pid                                │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
May 11 14:09:23 ds10243 bash[761045]: │ │     age = 1                                                              │ │
May 11 14:09:23 ds10243 bash[761045]: │ │     app = <gunicorn.app.wsgiapp.WSGIApplication object at                │ │
May 11 14:09:23 ds10243 bash[761045]: │ │           0x7f8d92758bd0>                                                │ │
May 11 14:09:23 ds10243 bash[761045]: │ │     cfg = <gunicorn.config.Config object at 0x7f8d91f68ad0>              │ │
May 11 14:09:23 ds10243 bash[761045]: │ │  jitter = 9                                                              │ │
May 11 14:09:23 ds10243 bash[761045]: │ │     log = <gunicorn.glogging.Logger object at 0x7f8d91e5aa10>            │ │
May 11 14:09:23 ds10243 bash[761045]: │ │    ppid = 761045                                                         │ │
May 11 14:09:23 ds10243 bash[761045]: │ │    self = <lifecycle.worker.DjangoUvicornWorker object at                │ │
May 11 14:09:23 ds10243 bash[761045]: │ │           0x7f8d8e8e1b10>                                                │ │
May 11 14:09:23 ds10243 bash[761045]: │ │ sockets = [<gunicorn.sock.TCPSocket object at 0x7f8d8e8e19d0>]           │ │
May 11 14:09:23 ds10243 bash[761045]: │ │ timeout = 15.0                                                           │ │
May 11 14:09:23 ds10243 bash[761045]: │ ╰──────────────────────────────────────────────────────────────────────────╯ │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/workers/worke │
May 11 14:09:23 ds10243 bash[761045]: │ rtmp.py:23 in __init__                                                       │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   20 │   │   fdir = cfg.worker_tmp_dir                                       │
May 11 14:09:23 ds10243 bash[761045]: │   21 │   │   if fdir and not os.path.isdir(fdir):                            │
May 11 14:09:23 ds10243 bash[761045]: │   22 │   │   │   raise RuntimeError("%s doesn't exist. Can't create workertm │
May 11 14:09:23 ds10243 bash[761045]: │ ❱ 23 │   │   fd, name = tempfile.mkstemp(prefix="wgunicorn-", dir=fdir)      │
May 11 14:09:23 ds10243 bash[761045]: │   24 │   │   os.umask(old_umask)                                             │
May 11 14:09:23 ds10243 bash[761045]: │   25 │   │                                                                   │
May 11 14:09:23 ds10243 bash[761045]: │   26 │   │   # change the owner and group of the file if the worker will run │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭───────────────────────────────── locals ─────────────────────────────────╮ │
May 11 14:09:23 ds10243 bash[761045]: │ │       cfg = <gunicorn.config.Config object at 0x7f8d91f68ad0>            │ │
May 11 14:09:23 ds10243 bash[761045]: │ │      fdir = '/tmp/authentik_worker_tmp'                                  │ │
May 11 14:09:23 ds10243 bash[761045]: │ │ old_umask = 18                                                           │ │
May 11 14:09:23 ds10243 bash[761045]: │ │      self = <gunicorn.workers.workertmp.WorkerTmp object at              │ │
May 11 14:09:23 ds10243 bash[761045]: │ │             0x7f8d8e9e8f10>                                              │ │
May 11 14:09:23 ds10243 bash[761045]: │ ╰──────────────────────────────────────────────────────────────────────────╯ │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /usr/local/lib/python3.11/tempfile.py:341 in mkstemp                         │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   338 │   else:                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   339 │   │   flags = _bin_openflags                                         │
May 11 14:09:23 ds10243 bash[761045]: │   340 │                                                                      │
May 11 14:09:23 ds10243 bash[761045]: │ ❱ 341 │   return _mkstemp_inner(dir, prefix, suffix, flags, output_type)     │
May 11 14:09:23 ds10243 bash[761045]: │   342                                                                        │
May 11 14:09:23 ds10243 bash[761045]: │   343                                                                        │
May 11 14:09:23 ds10243 bash[761045]: │   344 def mkdtemp(suffix=None, prefix=None, dir=None):                       │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭───────────────── locals ──────────────────╮                                │
May 11 14:09:23 ds10243 bash[761045]: │ │         dir = '/tmp/authentik_worker_tmp' │                                │
May 11 14:09:23 ds10243 bash[761045]: │ │       flags = 131266                      │                                │
May 11 14:09:23 ds10243 bash[761045]: │ │ output_type = <class 'str'>               │                                │
May 11 14:09:23 ds10243 bash[761045]: │ │      prefix = 'wgunicorn-'                │                                │
May 11 14:09:23 ds10243 bash[761045]: │ │      suffix = ''                          │                                │
May 11 14:09:23 ds10243 bash[761045]: │ │        text = False                       │                                │
May 11 14:09:23 ds10243 bash[761045]: │ ╰───────────────────────────────────────────╯                                │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ /usr/local/lib/python3.11/tempfile.py:256 in _mkstemp_inner                  │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │   253 │   │   file = _os.path.join(dir, pre + name + suf)                    │
May 11 14:09:23 ds10243 bash[761045]: │   254 │   │   _sys.audit("tempfile.mkstemp", file)                           │
May 11 14:09:23 ds10243 bash[761045]: │   255 │   │   try:                                                           │
May 11 14:09:23 ds10243 bash[761045]: │ ❱ 256 │   │   │   fd = _os.open(file, flags, 0o600)                          │
May 11 14:09:23 ds10243 bash[761045]: │   257 │   │   except FileExistsError:                                        │
May 11 14:09:23 ds10243 bash[761045]: │   258 │   │   │   continue    # try again                                    │
May 11 14:09:23 ds10243 bash[761045]: │   259 │   │   except PermissionError:                                        │
May 11 14:09:23 ds10243 bash[761045]: │                                                                              │
May 11 14:09:23 ds10243 bash[761045]: │ ╭─────────────────────────────── locals ────────────────────────────────╮    │
May 11 14:09:23 ds10243 bash[761045]: │ │         dir = '/tmp/authentik_worker_tmp'                             │    │
May 11 14:09:23 ds10243 bash[761045]: │ │        file = '/tmp/authentik_worker_tmp/wgunicorn-j4ymtcno'          │    │
May 11 14:09:23 ds10243 bash[761045]: │ │       flags = 131266                                                  │    │
May 11 14:09:23 ds10243 bash[761045]: │ │        name = 'j4ymtcno'                                              │    │
May 11 14:09:23 ds10243 bash[761045]: │ │       names = <tempfile._RandomNameSequence object at 0x7f8d8e8c5f50> │    │
May 11 14:09:23 ds10243 bash[761045]: │ │ output_type = <class 'str'>                                           │    │
May 11 14:09:23 ds10243 bash[761045]: │ │         pre = 'wgunicorn-'                                            │    │
May 11 14:09:23 ds10243 bash[761045]: │ │         seq = 0                                                       │    │
May 11 14:09:23 ds10243 bash[761045]: │ │         suf = ''                                                      │    │
May 11 14:09:23 ds10243 bash[761045]: │ ╰───────────────────────────────────────────────────────────────────────╯    │
May 11 14:09:23 ds10243 bash[761045]: ╰──────────────────────────────────────────────────────────────────────────────╯
May 11 14:09:23 ds10243 bash[761045]: PermissionError: [Errno 13] Permission denied:
May 11 14:09:23 ds10243 bash[761045]: '/tmp/authentik_worker_tmp/wgunicorn-j4ymtcno'
May 11 14:09:23 ds10243 bash[760651]: {"error":"exit status 255","event":"gunicorn process died, restarting","level":"warning","logger":"authentik.router","timestamp":"2023-05-11T14:09:23-0>
May 11 14:09:25 ds10243 bash[761051]: {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1683817765.865397, "file": "/opt/authentik/src/authentik/li>
May 11 14:09:25 ds10243 bash[761051]: {"event": "Loaded config", "level": "debug", "logger": "authentik.lib.config", "timestamp": 1683817765.8720398, "file": "/etc/authentik/config.yml"}
May 11 14:09:26 ds10243 bash[761051]: 1683817766.034618 [info     ] Starting gunicorn 20.1.0       [gunicorn.error]
May 11 14:09:26 ds10243 bash[761051]: 1683817766.0352588 [info     ] Listening at: http://127.0.0.1:8000 (761051) [gunicorn.error]
May 11 14:09:26 ds10243 bash[761051]: 1683817766.0353942 [info     ] Using worker: lifecycle.worker.DjangoUvicornWorker [gunicorn.error]
May 11 14:09:26 ds10243 bash[761051]: 1683817766.0356805 [info     ] Unhandled exception in main loop [gunicorn.error]
May 11 14:09:26 ds10243 bash[761051]: ╭───────────────────── Traceback (most recent call last) ──────────────────────╮
May 11 14:09:26 ds10243 bash[761051]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:20 │
May 11 14:09:26 ds10243 bash[761051]: │ 2 in run                                                                     │
May 11 14:09:26 ds10243 bash[761051]: │                                                                              │
May 11 14:09:26 ds10243 bash[761051]: │   199 │   │   util._setproctitle("master [%s]" % self.proc_name)             │
May 11 14:09:26 ds10243 bash[761051]: │   200 │   │                                                                  │
May 11 14:09:26 ds10243 bash[761051]: │   201 │   │   try:                                                           │
May 11 14:09:26 ds10243 bash[761051]: │ ❱ 202 │   │   │   self.manage_workers()                                      │
May 11 14:09:26 ds10243 bash[761051]: │   203 │   │   │                                                              │
May 11 14:09:26 ds10243 bash[761051]: │   204 │   │   │   while True:                                                │
May 11 14:09:26 ds10243 bash[761051]: │   205 │   │   │   │   self.maybe_promote_master()                            │
May 11 14:09:26 ds10243 bash[761051]: │                                                                              │
May 11 14:09:26 ds10243 bash[761051]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:26 ds10243 bash[761051]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7fb95d1dbfd0> │               │
May 11 14:09:26 ds10243 bash[761051]: │ ╰────────────────────────────────────────────────────────────╯               │
May 11 14:09:26 ds10243 bash[761051]: │                                                                              │
May 11 14:09:26 ds10243 bash[761051]: │ /opt/authentik/src/.venv/lib/python3.11/site-packages/gunicorn/arbiter.py:55 │
May 11 14:09:26 ds10243 bash[761051]: │ 1 in manage_workers                                                          │
May 11 14:09:26 ds10243 bash[761051]: │                                                                              │
May 11 14:09:26 ds10243 bash[761051]: │   548 │   │   as required.                                                   │
May 11 14:09:26 ds10243 bash[761051]: │   549 │   │   """                                                            │
May 11 14:09:26 ds10243 bash[761051]: │   550 │   │   if len(self.WORKERS) < self.num_workers:                       │
May 11 14:09:26 ds10243 bash[761051]: │ ❱ 551 │   │   │   self.spawn_workers()                                       │
May 11 14:09:26 ds10243 bash[761051]: │   552 │   │                                                                  │
May 11 14:09:26 ds10243 bash[761051]: │   553 │   │   workers = self.WORKERS.items()                                 │
May 11 14:09:26 ds10243 bash[761051]: │   554 │   │   workers = sorted(workers, key=lambda w: w[1].age)              │
May 11 14:09:26 ds10243 bash[761051]: │                                                                              │
May 11 14:09:26 ds10243 bash[761051]: │ ╭────────────────────────── locals ──────────────────────────╮               │
May 11 14:09:26 ds10243 bash[761051]: │ │ self = <gunicorn.arbiter.Arbiter object at 0x7fb95d1dbfd0> │               │
May 11 14:09:26 ds10243 bash[761051]: │ ╰────────────────────────────────────────────────────────────╯               │

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants