Am 11.03.2021 09:21, schrieb Jan Dittberner:

Hallo Jan,

soll uwsgi die Anwendung direkt per HTTP ausliefern oder das uwsgi-Protokoll sprechen? Ich habe vor Python-Anwendungen im uwsgi noch einen nginx, der die

Gerne gleich auch HTTP, ich werde das sowieso hinter einen Apache-Proxy laufen lassen.

TLS-Terminierung macht. Die UWSGI-Konfiguration (bei dir app.ini) für eine
Flask-Anwendung sieht bei mir so aus:

Meine Datei /etc/uwsgi/apps-enabled/opentopodata.ini sieht so aus:

[uwsgi]
strict = true
need-app = true

http-socket = :9090
vacuum = true
uid = www-data
gid = www-data

master = true
wsgi-file = /home/opentopodata/opentopodata/api.py
callable = app
manage-script-name = true
die-on-term = true
buffer-size = 65535


wenn ich uwsgi manuell starte (/usr/local/bin/uwsgi --ini /home/opentopodata/uwsgi.ini --processes 10s) hat gestern geklappt, jetzt, ohne dass ich was geändert habe, spuckt diese Fehler aus:

[uWSGI] getting INI configuration from /etc/uwsgi/apps-enabled/opentopodata.ini
*** Starting uWSGI 2.0.19.1 (64bit) on [Thu Mar 11 10:28:33 2021] ***
compiled with version: 8.3.0 on 10 March 2021 11:38:27
os: Linux-4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30)
nodename: tiles.srv.lucabert.intra
machine: x86_64
clock source: unix
detected number of CPU cores: 4
current working directory: /etc/uwsgi/apps-enabled
detected binary path: /usr/local/bin/uwsgi
!!! no internal routing support, rebuild with pcre support !!!
setgid() to 33
setuid() to 33
your processes number limit is 63566
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address :9090 fd 3
Python version: 3.7.3 (default, Jul 25 2020, 13:03:44)  [GCC 8.3.0]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x562646528a20
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 1477949 bytes (1443 KB) for 10 cores
*** Operational MODE: preforking ***
Traceback (most recent call last):
  File "/home/opentopodata/opentopodata/api.py", line 8, in <module>
    from opentopodata import backend, config, utils
ModuleNotFoundError: No module named 'opentopodata'
unable to load app 0 (mountpoint='') (callable not found or import error)
*** no app loaded. GAME OVER ***

Die Datei existiert...
Ich verstehe wirklich nicht... Hast du ein Tipp?

Danke
Luca Bertoncello
(lucab...@lucabert.de)

Antwort per Email an