Dotcloud uWSGI Error

799 Views Asked by At

I am trying to deploy one of my applications on dotcloud. However, I keep getting:

uWSGI Error

wsgi application not found

Somebody could hint at some useful docs where this issue is discussed? My application is here:

https://github.com/kfk/datacrowd

and I do think everything is done by the tutorials.

1

There are 1 best solutions below

2
On BEST ANSWER

Not sure if you looked at this page or not, but it is a good resource for deploying flask apps onto dotCloud. http://flask.pocoo.org/snippets/48/

Looking at your application, it looks like most things are setup correctly the only thing that looks a little odd is your wsgi.py file.

Have you tried to change your wsgi.py file so that it looks like this.

import sys
sys.path.append('/home/dotcloud/current')
from datacrowd.app import app as application

application.config.update(DEBUG=True)

basically I removed the if statement at the end. Try that and see if it helps at all.

If not, try commenting out the application.config.update(DEBUG=True) line and see if that helps as well.

oh yeah one more thing, it looks like you have a static file instead of a static directory, not sure if you did that on purpose or not, but usually static is a directory where you put your static media, so that is most likely suppose to be symlink to datacrowd/static

Update:

Since you had the same error, then it is most likely something wrong with your application.

ssh into your service.

$ dotcloud ssh <app.service>

And then look at your logs in /var/log/supervisor/uwsgi.log, you will most likely see a syntax error, and a stack trace, telling you where the error is.

Common issues are usually

  • dependencies not being installed
  • Using features from a new version of python. (python 2.7, 3.x, features) when the python version on dotCloud is only 2.6.x.
  • syntax typos (indent issues, etc)