I'm attempting to deploy a flask web app I've developed using cherokee and uwsgi. I got cherokee and uwsgi installed and working (i think uwsgi works), but when I configure the app in cherokee, i just get an error saying
uWSGI Error wsgi application not found. I used an xml config file (I think you need to with cherokee), and that contains this:
<uwsgi> <pythonpath>/srv/mobile-site/app/</pythonpath> <app mountpoint="/"> <module>mobilecms</module> <callable>app</callable> </app> </uwsgi>
My flask app is obviouly in the
/srv/mobile-site/app/ folder with the main script being
Is there something wrong with this file? Would permission errors cause this? Thanks in advance for any help!
Roberto's suggestion is a good one; it will help diagnose where the error is occurring (i.e. whether it's uWSGI or Cherokee).
I've also recently fought to get uWSGI and Cherokee to work together. I ended up configuring the uWSGI source in Cherokee manually:
/usr/local/bin/uwsgi -x /path/to/uwsgiconfig.xml
In my uWSGI config file I have something like this (adapted to your example):
<uwsgi> <chdir>/srv/mobile-site/app/</chdir> <wsgi-file>/srv/mobile-site/app/mobilecms.py</wsgi-file> <callable>app</callable> <socket>/tmp/foo.sock</socket> <chmod-socket>666</chmod-socket> <master /> <processes>1</processes> <disable-logging /><!-- Errors are still logged; this just disables request logging which Cherokee takes care of --> <vacuum /> <no-orphans /> </uwsgi>
Note that the Cherokee uWSGI wizard doesn't accept this as a valid configuration file (hence the manual configuration).
Always try uWSGI deploy without a webserver, before going in production.
It will print a lot of information/errors