uwsgi:无法检测到插件

4

我在Ubuntu上安装了uwsgi,然后使用以下命令安装插件:

$ sudo apt-get install uwsgi
$ sudo apt-get install uwsgi-plugin-python3
$ sudo apt-get install uwsgi-plugin-python

当我使用以下命令在bash脚本中杀死uwsgi进程并重新运行uwsgi时:

killall -9 uwsgi

uwsgi --ini /path/to/uwsgi.ini

#!/bin/bash
echo '********* kill instance ******************'
sudo kill -HUP `cat /tmp/sup-epa.pid`
uwsgi --reload /tmp/sup-epa.pid
sudo touch /tmp/sup.epa.sock

uwsgi --emperor /etc/uwsgi/vassals/

输出结果为:
!!!!!!!!!!!!!! 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 !!!!!!!!!!

但实际上,uwsgi配置文件中有它:

[uwsgi]
plugins-dir=/usr/lib/uwsgi/plugins/
plugin = python3

根据手册,最好的方法是将参数放在一个ini文件中,然后使用ini加载它。我应该用插件路径运行uwsgi,然后放置--plugin参数吗?

请按照步骤阅读此内容:http://uwsgi-docs.readthedocs.org/en/latest/Install.html - dsgdfg
1个回答

2
您可以在emperor模式下无问题地使用ini文件。
使用您已安装的发行版软件包时,应指定plugin = python。这里没有必要使用plugin-dir。除非您想指定要使用的Python版本,否则不要使用plugin = pythonXX。但是,如果您想以这种方式完成此操作,则需要其他配置。请参阅Python快速入门章节“奖励:同一uWSGI二进制文件的多个Python版本”。
或者,您可以使用类似于以下内容的固定版本:sudo update-alternatives --set uwsgi /usr/bin/uwsgi_python27。假设您想要的版本已安装sudo update-alternatives --list uwsgi

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接