问题
I've loaded uWSGI v 1.9.20, built from source. I'm getting this error, but how do I tell which plugin is needed?
!!!!!!!!!!!!!! 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 !!!!!!!!!!
Which plugin should be loaded?
回答1:
I had this problem and was stuck for hours.
my issue is different than the answer listed, make sure you have plugins = python
in your uwsgi ini file and you install the uwsgi python
plugin:
sudo apt-get install uwsgi-plugin-python
After I did the above my application worked. Obviously this is for python
projects, but a similar approach is required for other projects.
回答2:
It might be easiest to install uwsgi through pip instead of the package manager from the OS you're using, the package in pip is usually more up to date than the package managers from the OS you might be using:
sudo pip install uwsgi
This solved it for me anyway.
For using multiple Python versions on the same server, I would advice to take a look at virtualenv:
https://virtualenv.pypa.io/en/latest/
回答3:
Just stumbled upon this error message and wasted a couple of hours, yet in my case the cause was different from everything mentioned in other answers already.
Suppose you just installed a local uWSGI version via pip
into your own virtualenv (e.g. as described here).
Suppose you are now trying to run your uWSGI server as root (because you want to serve the app as www-data
user, for example). This is how you would do it, right?
. venv/bin/activate
sudo uwsgi --ini your-app.ini
Wrong! Even though your local uwsgi
is in your path after you activated your environment, this path is not passed into the sudo
command, and you are launching the system uwsgi
rather than your local one, which may be the source of endless confusion, like it was in my case.
So, the solution in my case was to simply specify the full path:
sudo /full/path/to/venv/bin/uwsgi --ini your-app.ini
回答4:
I had similar issue but this solved it (btw, I use MacOs, and both python2&3 versions installed, but I wanted to use Python3):
- Open terminal and check for python3 location by typing:
which python3
- Copy the full path and assign it to; plugins option in .ini file
I hope it helps!
回答5:
If you've followed all the python plugin installation steps and uwsgi --plugin-list
still fails to list 0: python
as one of the plugins, try restarting your computer. My uwsgi instance ran as a service (from Bash, use service status-all
to see running services) and probably the updated config settings were loaded on service restart.
回答6:
On my side, this is because instead of having [uwsgi]
as the header of my configuration inside /etc/uwsgi/apps-available/
, I put something else (the name of the app).
来源:https://stackoverflow.com/questions/20176959/uwsgi-no-request-plugin-is-loaded-you-will-not-be-able-to-manage-requests