Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

nginx + uwsgi: -- unavailable modifier requested: 0 --

Ubuntu 12.04, nginx 1.2.0, uwsgi 1.0.3.

I start uwsgi with the following command:

uwsgi -s 127.0.0.1:9010 -M -t 30 -A 4 -p 4 -d /var/log/uwsgi.log

On each request nginx replies with 502 and uwsgi writes to log the following line:

-- unavailable modifier requested: 0 --
like image 360
Lisio Avatar asked May 25 '12 03:05

Lisio


3 Answers

Original answer

For Python 2 on Ubuntu 11.10, using upstart, install the python plugin for uWSGI with apt-get install uwsgi-plugin-python and if you're using an ini file to configure your uWSGI app, then add plugins = python to the [uwsgi] section and it should solve this problem.

Edit: Updated for Python 3 and Ubuntu 17.10

For Python 3 on Ubuntu 17.10, using systemd, install the python plugin for uWSGI with apt-get install uwsgi-plugin-python3 and if you're using an ini file to configure your uWSGI app, then add plugins = python to the [uwsgi] section and it should solve this problem.

For more information on getting started with python/uWSGI apps, including how to configure them using an ini file then please take a look at this handy guide

like image 137
SHaKie Avatar answered Nov 18 '22 10:11

SHaKie


Solved by installing uwsgi-plugin-python3 plugin and adding --plugin python3 option to uwsgi start command

like image 37
Lisio Avatar answered Nov 18 '22 10:11

Lisio


Im starting uwsgi from upstart on Ubuntu. I solved the problem by running apt-get install uwsgi-plugin-python, and then adding plugins=python to my application.ini in /etc/uwsgi/applications-available.

like image 15
shane Avatar answered Nov 18 '22 09:11

shane