uWSGI não pode carregar virtualenv

1

Estou configurando um aplicativo Python usando nginx e uWSGI. Minhas dependências estão em um virtualenv. Se eu ativar o virtualenv manualmente, tudo funciona executando este comando:

uwsgi --ini uwsgi.ini

Mas se eu tentar executar o mesmo comando com o virtualenv desativado, recebo isso na saída (sem erros de permissão específicos):

*** no app loaded. going in full dynamic mode ***

Da mesma forma, quando o Emperor carrega o arquivo ini, ele não pode executar o aplicativo. Meu entendimento é que usar a opção home deve ativar o virtualenv, mas não parece estar funcionando. (O módulo wsgi.py que é carregado também ativa o virtualenv, então eu não sei ao certo por que eu deveria precisar fazer isso antes ...)

Aqui está meu uwsgi.ini :

[uwsgi]
uid = 1000
socket = 127.0.0.1:8000
workers = 3
master = true
processes = 5
module = wsgi:application
chdir = /home/laststatement/app/laststatement
home = /home/laststatement/.virtualenvs/last
logto = /home/laststatement/log/uwsgi.log

Aqui está o log do uWSGI:

machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /etc/uwsgi/apps-enabled
detected binary path: /usr/bin/uwsgi-core
uWSGI running as root, you can use --uid/--gid/--chroot options
setuid() to 1000
your processes number limit is 3750
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 127.0.0.1:8000 fd 3
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 436752 bytes (426 KB) for 5 cores
*** Operational MODE: preforking ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!
no request plugin is loaded, you will not be able to manage requests.
you may need to install the package for your language of choice, or simply load it with --plugin.
!!!!!!!!!!! END OF WARNING !!!!!!!!!!
spawned uWSGI master process (pid: 834)
spawned uWSGI worker 1 (pid: 838, cores: 1)
spawned uWSGI worker 2 (pid: 839, cores: 1)
spawned uWSGI worker 3 (pid: 840, cores: 1)
spawned uWSGI worker 4 (pid: 841, cores: 1)
spawned uWSGI worker 5 (pid: 842, cores: 1)
-- unavailable modifier requested: 0 --
announcing my loyalty to the Emperor...
-- unavailable modifier requested: 0 --
announcing my loyalty to the Emperor...
    
por handsofaten 28.10.2014 / 23:02

1 resposta

0

Você está claramente executando duas versões diferentes do uWSGI. Um no virtualenv com o plugin python incorporado, e um sistema para o qual você não carregou o plugin python:

!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!! no request plugin is loaded, you will not be able to manage requests. you may need to install the package for your language of choice, or simply load it with --plugin. !!!!!!!!!!! END OF WARNING !!!!!!!!!!

apenas instale o plug-in uwsgi python e ative-o com plugin = python

    
por 29.10.2014 / 06:06