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?