0

I created a small python app installed it to my system via setuptools (setup.py and setup() method).

In python i can do following :

>>> import fms.server_api
>>> dir (fms.server_api)
['BaseFMSException', 'Flask', 'InnerServerError', 'LOG', '__builtins__', '__doc__',     '__file__', '__name__', '__package__', 'app', 'handlers', 'json_utils', 'log_utils',     'logging', 'request', 'safe_handle', 'search_albums', 'search_artist', 'search_songs', 'test']

Where app is my Flask app.

This is config of my uwsgi:

[uwsgi]

socket = /var/tmp/fms_flask.sock
module = fms.server_api:app
master =true
processes = 1
threads = 2

What is the problem ? Problem is that i cannot run uwsgi as sudo service uwsgi restart:

Log here:

[uWSGI] getting INI configuration from /usr/share/uwsgi/conf/default.ini
[uWSGI] getting INI configuration from /etc/uwsgi/apps-enabled/fms_flask.ini
Mon Dec 16 05:32:46 2013 - *** Starting uWSGI 1.0.3-debian (32bit) on [Mon Dec 16 05:32:46 2013] ***
Mon Dec 16 05:32:46 2013 - compiled with version: 4.6.3 on 17 July 2012 02:24:04
Mon Dec 16 05:32:46 2013 - current working directory: /
Mon Dec 16 05:32:46 2013 - writing pidfile to /run/uwsgi/app/fms_flask/pid
Mon Dec 16 05:32:46 2013 - detected binary path: /usr/bin/uwsgi-core
Mon Dec 16 05:32:46 2013 - setgid() to 33
Mon Dec 16 05:32:46 2013 - setuid() to 33
Mon Dec 16 05:32:46 2013 - your memory page size is 4096 bytes
Mon Dec 16 05:32:46 2013 - allocated 1296 bytes (1 KB) for 2 cores per worker.
Mon Dec 16 05:32:46 2013 - uwsgi socket 0 bound to UNIX address /run/uwsgi/app/fms_flask/socket fd 5
Mon Dec 16 05:32:46 2013 - uwsgi socket 1 bound to UNIX address /var/tmp/fms_flask.sock fd 6
Mon Dec 16 05:32:46 2013 - your server socket listen backlog is limited to 100 connections
Mon Dec 16 05:32:46 2013 - *** Operational MODE: threaded ***
Mon Dec 16 05:32:46 2013 - *** no app loaded. going in full dynamic mode ***
Mon Dec 16 05:32:46 2013 - *** uWSGI is running in multiple interpreter mode ***
Mon Dec 16 05:32:46 2013 - spawned uWSGI master process (pid: 31994)
Mon Dec 16 05:32:46 2013 - spawned uWSGI worker 1 (pid: 31996, cores: 2)
Mon Dec 16 05:34:05 2013 - -- unavailable modifier requested: 0 --
Mon Dec 16 05:34:05 2013 - -- unavailable modifier requested: 0 --

But it perfectly works if i use sudo uwsgi --ini /etc/uwsgi/apps-enabled/fms_flask.ini

Where a problem can be?

Vetalll
  • 3,472
  • 6
  • 24
  • 34
  • How did you install uwsgi? – Burhan Khalid Dec 16 '13 at 10:54
  • First i instaled uwsgi with sudo pip install uwsgi. I had trouble with it and i installed uwsgi with sudo apt-get install uwsgi (without removing from pip) – Vetalll Dec 16 '13 at 11:06
  • 2
    Yeah, you have two versions of `uwsgi` installed now. You need to keep one version; and then see [this question](http://stackoverflow.com/questions/10748108/nginx-uwsgi-unavailable-modifier-requested-0) to fix your other problem. – Burhan Khalid Dec 16 '13 at 12:04
  • Thx. I removed uwsgi from pip and did actions from http://stackoverflow.com/a/11055729/1368428 . It wroks. – Vetalll Dec 16 '13 at 12:32

0 Answers0