[uWSGI] Problem with cherokee (app: -1)

Damjan Georgievski gdamjan at gmail.com
Mon Jul 12 18:32:27 CEST 2010


> And it does not work under / ?

Let me revisit this problem.
I'm using Cherokee 1.0.5 on Ubuntu 9.10. uWsgi is 0.9.5.4

So, I have a single minimal WSGI application in the file x.wsgi:

# start of file
def application(environ, start_response):
    start_response('200 OK', [('content-type', 'text/plain')])
    yield 'Hello world!\n'
    yield "SCRIPT_NAME: %s\n" % environ.get('SCRIPT_NAME', '')
    yield "PATH_INFO: %s\n" % environ.get('PATH_INFO', '')
# end of file


I *don't* want to use Dynamic Apps, I want *EVERY* uwsgi request to be
handled by the WSGI app above.


I start uwsgi with:
uwsgi --socket 127.0.0.1:37117 --wsgi-file x.wsgi

and I have the uWsgi handler in Cherokee set for the /wsgi "directory":

vserver!10!rule!260!handler = uwsgi
vserver!10!rule!260!handler!balancer = round_robin
vserver!10!rule!260!handler!balancer!source!1 = 12
vserver!10!rule!260!match = directory
vserver!10!rule!260!match!directory = /wsgi
...
source!12!host = 127.0.0.1:37117
source!12!nick = uwsgi test
source!12!type = host

When I try to access the url (http://damjan.softver.org.mk/wsgi/), I
get an error in the browser:
"""
uWSGI Error
wsgi application not found
"""

And in the console where I started uwsgi I get:

*** Starting uWSGI 0.9.5.4 (32bit) on [Mon Jul 12 18:28:46 2010] ***
compiled with version: 4.4.1
Python version: 2.6.4 (r264:75706, Dec  7 2009, 19:02:09)
[GCC 4.4.1]
 *** WARNING: you are running uWSGI without its master process manager ***
your memory page size is 4096 bytes
allocated 372 bytes (0 KB) for 1 request's buffer.
binding on TCP port: 37117
your server socket listen backlog is limited to 64 connections
initializing hooks...done.
application 0 (/) ready
setting default application to 0
spawned uWSGI worker 1 (and the only) (pid: 21204)
[pid: 21204|app: -1|req: -1/1] 192.168.1.253 () {60 vars in 1078
bytes} [Mon Jul 12 18:28:52 2010] GET /wsgi/ => generated 46 bytes in
0 msecs (HTTP/1.0 500) 2 headers in 63 bytes (0 async switches on
async core 0)


It seems to me that uWsgi is doing some internal routing, but I wan to
*AVOID* that. As I said earlier I wan't every request handled by the
same application.
Is this even possible with uWsgi?


-- 
damjan


More information about the uWSGI mailing list