Thank you so much, everything is now working.

On Sat, Apr 7, 2012 at 1:38 AM, Roberto De Ioris <[email protected]> wrote:

>
> > Hi List,
> >
> > I've been banging on this all day and evening, and I just have no idea
> > what
> > it is that I'm doing wrong. If someone can let me know the secret sauce
> to
> > starting this guy up, I'd really appreciate it.
> >
> > My environment:
> > - Centos 5 x86_64
> > - Python 2.6.4 installed via EPEL
> > - Pymodules: pip-26, virtualenv, sqlite3, pygments, uwsgi, flask
> > - virtualenv directory is: /home/user/code/newapp/env
> > - directory with application code: /home/user/code/newapp/v0.1
> >
> > I've tried a ton of different combos on starting this up. At the very
> best
> > I could get a uwsgi error stating it can't find my application (I think
> > this was a PATH issue). And at worst, I was tossing 500 errors.
> >
> > My last iteration of starting this up was:
> >
> > $ cd /home/user/code/newapp
> > $ . env/bin/activate
> > $ uwsgi -s /tmp/newapp.sock -M -p 4 -C 666 -H /home/user/code/newapp/env
> > --pp /home/user/code/newapp --pp /home/user/code/newapp/v0.1
> >
> > It starts up with this:
> >
> > *** Starting uWSGI 1.1.2 (64bit) on [Sat Apr  7 08:48:00 2012] ***
> > compiled with version: 4.1.2 20080704 (Red Hat 4.1.2-51) on 06 April 2012
> > 23:05:01
> > current working directory: /home/user/code/newapp/v0.1
> > detected binary path: /home/user/code/newapp/env/bin/uwsgi
> > your memory page size is 4096 bytes
> > detected max file descriptor number: 1024
> > lock engine: pthread mutexes
> > uwsgi socket 0 bound to UNIX address /tmp/newapp.sock fd 3
> > Python version: 2.6.5 (r265:79063, Feb 28 2011, 21:55:45)  [GCC 4.1.2
> > 20080704 (Red Hat 4.1.2-50)]
> > Set PythonHome to /home/user/code/newapp/env/
> > Python main interpreter initialized at 0xab6ff60
> > your server socket listen backlog is limited to 100 connections
> > *** Operational MODE: preforking ***
> > added /home/user/code/newapp/ to pythonpath.
> > added /home/user/code/newapp/v0.1/ to pythonpath.
> > *** no app loaded. going in full dynamic mode ***
> > *** uWSGI is running in multiple interpreter mode ***
> > spawned uWSGI master process (pid: 22688)
> > spawned uWSGI worker 1 (pid: 22689, cores: 1)
> > spawned uWSGI worker 2 (pid: 22690, cores: 1)
> > spawned uWSGI worker 3 (pid: 22691, cores: 1)
> > spawned uWSGI worker 4 (pid: 22692, cores: 1)
> >
> > When I visit the url where I should get something, I get the following
> > error in my browser:
> >
> > uWSGI ErrorPython application not found
> >
> > And on the command line I get:
> >
> > [pid: 22692|app: -1|req: -1/1] my.ip.address () {38 vars in 586 bytes}
> > [Sat
> > Apr  7 08:48:07 2012] GET / => generated 48 bytes in 0 msecs (HTTP/1.1
> > 500)
> > 2 headers in 63 bytes (0 switches on core 0)
> >
> > I have tried many numerous things, all to no avail. Any help would be
> > greatly appreciated. Bows head in shame of n00b-ness.
> >
>
> You are missing to tell uWSGI what app to load (via --module, --file or
> whatever you want). You have only set its search paths. You do not need to
> activate the virtualenv, using -H/--virtualenv is enough.
>
> For flask the command line is simple as:
>
> uwsgi --http :port --file <path_to_your_flask_app.py> --callable app
> --virtualenv <path_to_your_virtualenv>
>
> starts from here: http://projects.unbit.it/uwsgi/wiki/Quickstart
>
> Eventually adjust your PYTHONPATH (with --pp) as needed.
>
> Important thing: start always in http mode, otherwise you will never know
> if the problem is uWSGI or your webserver
>
> --
> Roberto De Ioris
> http://unbit.it
> _______________________________________________
> uWSGI mailing list
> [email protected]
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to