5

I'm trying to deploy a python app to my Ubuntu 12.04.1 VPS running Nginx / uWSGI. I've setup my server following this guide. When I restart uWSGI I get this message:

nickd@my-vps:~$ sudo /etc/init.d/uwsgi restart  
[sudo] password for nickd:   
* Restarting app server(s) uwsgi  
[uWSGI] getting INI configuration from /usr/share/uwsgi/conf/default.ini  
[uWSGI] parsing  config file /etc/uwsgi/apps-enabled/application.net.xml  
open("./python_plugin.so"): No such file or directory [core/utils.c line 4700]  
!!! UNABLE to load uWSGI plugin: ./python_plugin.so: cannot open shared object file: No such file or directory !!!   Tue Dec 11
15:18:06 2012 - [WARNING] option "app" is deprecated: use the more advanced "mount" option

My application.net.xml:

<uwsgi>
    <plugin>python</plugin>
    <socket>/run/uwsgi/app/application.net/application.net.socket</socket>
    <pythonpath>/var/www/apps/application/</pythonpath>
    <app mountpoint="/">
        <script>wsgi_configuration_module</script>
    </app>
    <master/>
    <processes>4</processes>
    <harakiri>60</harakiri>
    <reload-mercy>8</reload-mercy>
    <cpu-affinity>1</cpu-affinity>
    <stats>/tmp/stats.socket</stats>
    <max-requests>2000</max-requests>
    <limit-as>512</limit-as>
    <reload-on-as>256</reload-on-as>
    <reload-on-rss>192</reload-on-rss>
    <no-orphans/>
    <vacuum/>
</uwsgi>

My INI config is default.

Any help getting uWSGI to load the python plugin would be appreciated.

d a i s y
  • 5,551
Nick
  • 147

4 Answers4

3

You need to have the plugin installed.

sudo apt-get install uwsgi-plugin-python3
NuclearPeon
  • 446
  • 4
  • 8
1

For ubuntu and python3: make sure the result of "which uwsgi" is: /usr/local/bin/uwsgi and remove the following settings in your .ini file: plugin=python3


Then try again.

0

I wanted to post this as a comment, but don't have enough reputation.

If you have installed your uwsgi with pip or make (or otherwise made a custom build), your python plugin would be built into the binary and thus not created as a shared library (.so file). Removing the <plugin>python</plugin> line should solve the problem in this case, as it's not necessary, but breaks the setup.

A solution to a similar problem was explained here.

mapto
  • 339
-2

I just ended up using Phusion Passenger to run my application. It was as simple as configuring and running Nginx.

Nick
  • 147