Hi Folks

Before seeking help, please let me take the opportunity to thank Ian and
everyone involved in the Paste effort. I think it's fab, I can't claim
to have got my head completely around wsgi, but without paste I wouldn't
have been able to get off the starting blocks!

But, :-(
I have an application that I've been developing that uses paste to
configure itself. It works fine when I deploy it using wsgiutils, but
when I configure it to use fastcgi in lightpd, urlmap can't
find the applications.

The code itself is not properly deployed as an egg (that'll happen, but
not yet), and is loaded into the environment via PYTHONPATH at
deployment (in the script that calls paster itself). I suspect that's
the problem, but can't work out what to
do about it ... anyway this is where I am:

What works is as follows (trying to cut down to the essentials):

Paste ndg.ini file:

[server:main]
use = egg:PasteScript#wsgiutils
host = localhost.localdomain
port = 8001

[composite:main]
use=egg:paste#urlmap
...

So that when the browser visits:
http://localhost.localdomain:8001/discovery

we see this logged to stdout:
127.0.0.1 - - [11/Jan/2007:18:32:39 +0100] "GET /discovery HTTP/1.1" 200
- "-" "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.2 (like
Gecko) Kubuntu 6.06 Dapper"
127.0.0.1 - - [11/Jan/2007:18:32:39 +0100] "GET /layout/ndg.css
HTTP/1.1" 200 2674 "http://localhost.localdomain:8001/discovery";
"Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.2 (like Gecko)
Kubuntu 6.06 Dapper"

i.e. it works ok (found the application, and the next thing that happens
is a css file is loaded )

However, if I modify my paste ini file to have this at the top:

[server:main]
#use = egg:PasteScript#wsgiutils
#host = localhost.localdomain
#port = 8001
use = egg:PasteScript#flup_fcgi_thread
socket = /tmp/ndg.fastcgi.soc

with lightpd config file:

fastcgi.server    = ( "" =>
                      ( "localhost" =>
                                        (
                          "socket" => "/tmp/ndg.fastcgi.soc",
                          "check-local" => "disable",
                          "min-procs" => 2 ) ) )

and then visit:
http://localhost.localdomain/discovery

I see in the log file: 

127.0.0.1 localhost.localdomain - [11/Jan/2007:18:38:19 +0000]
"GET /discovery HTTP/1.1" 404 447 "-" "Mozilla/5.0 (compatible;
Konqueror/3.5; Linux) KHTML/3.5.2  (like Gecko) Kubuntu 6.06 Dapper"

.. and get a resource not found which seems to have been thrown by
urlmap in paste ... (i.e. I think we can reject lighttpd config problems
per se unless www-data can't get at the code ... which I don't think is
a problem ... but haven't categorically ruled out).

So clearly the map has failed to find the application. Getting back to
my kludgy code location it's done using:

export PYTHONPATH=$PWD
paster serve ndg.ini

I've got more than a vague feeling that this is the problem. Can someone
put some flesh on my vacuousness?

Thanks in advance,
Bryan









_______________________________________________
Paste-users mailing list
[email protected]
http://webwareforpython.org/cgi-bin/mailman/listinfo/paste-users

Reply via email to