Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Unable to run Django

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


nils.grotnes at gmail

Sep 19, 2009, 4:49 AM

Post #1 of 9 (471 views)
Permalink
Unable to run Django

Hi.

I'm trying to run Django through Cherokee 0.99.24-1~jaunty~ppa1 on
Ubuntu 9.04 server without success.

To be sure I'm not doing something silly, I've purged the system and
installed Cherokee from scratch. Then I've used the wizard to set up a
minimal Django site using defaults wherever I could.

The server starts without complaint, but serves only from the default
"fall through" handler, and there's no scgi processes started.

The config file below, minus icon- and mime-lines.

Any tips on how to troubleshoot this thing? I've already tried running
the interpreter line from a shell as the www-data user, and it seems
to work as there's six processes listed by ps aux | grep python
afterwards.

Nils


server!bind!1!port = 80
server!group = www-data
server!keepalive = 1
server!keepalive_max_requests = 500
server!panic_action = /usr/share/cherokee/cherokee-panic
server!pid_file = /var/run/cherokee.pid
server!server_tokens = full
server!timeout = 15
server!user = www-data
vserver!10!directory_index = index.html
vserver!10!document_root = /var/www
vserver!10!logger = combined
vserver!10!logger!access!buffsize = 16384
vserver!10!logger!access!filename = /var/log/cherokee/cherokee.access
vserver!10!logger!access!type = file
vserver!10!logger!error!filename = /var/log/cherokee/cherokee.error
vserver!10!logger!error!type = file
vserver!10!nick = default
vserver!10!rule!5!encoder!gzip = 1
vserver!10!rule!5!handler = server_info
vserver!10!rule!5!handler!type = just_about
vserver!10!rule!5!match = directory
vserver!10!rule!5!match!directory = /about
vserver!10!rule!4!document_root = /usr/lib/cgi-bin
vserver!10!rule!4!handler = cgi
vserver!10!rule!4!match = directory
vserver!10!rule!4!match!directory = /cgi-bin
vserver!10!rule!3!document_root = /usr/share/cherokee/themes
vserver!10!rule!3!handler = file
vserver!10!rule!3!match = directory
vserver!10!rule!3!match!directory = /cherokee_themes
vserver!10!rule!2!document_root = /usr/share/cherokee/icons
vserver!10!rule!2!handler = file
vserver!10!rule!2!match = directory
vserver!10!rule!2!match!directory = /icons
vserver!10!rule!1!handler = common
vserver!10!rule!1!handler!iocache = 0
vserver!10!rule!1!match = default
vserver!20!document_root = /var/www
vserver!20!logger = combined
vserver!20!logger!access!buffsize = 16384
vserver!20!logger!access!filename = /var/log/cherokee/cherokee.access
vserver!20!logger!access!type = file
vserver!20!logger!error!filename = /var/log/cherokee/cherokee.error
vserver!20!logger!error!type = file
vserver!20!nick = www.nilsr.com
vserver!20!rule!500!handler = file
vserver!20!rule!500!match = fullpath
vserver!20!rule!500!match!fullpath!1 = /favicon.ico
vserver!20!rule!500!match!fullpath!2 = /robots.txt
vserver!20!rule!500!match!fullpath!3 = /crossdomain.xml
vserver!20!rule!10!expiration = time
vserver!20!rule!10!expiration!time = 7d
vserver!20!rule!10!handler = file
vserver!20!rule!10!match = directory
vserver!20!rule!10!match!directory = /media
vserver!20!rule!1!encoder!gzip = 1
vserver!20!rule!1!handler = scgi
vserver!20!rule!1!handler!balancer = round_robin
vserver!20!rule!1!handler!balancer!source!1 = 1
vserver!20!rule!1!handler!check_file = 0
vserver!20!rule!1!handler!error_handler = 1
vserver!20!rule!1!match = default
source!1!env_inherited = 1
source!1!host = /tmp/cherokee-source1.sock
source!1!interpreter = python /home/nils/mysite/manage.py runfcgi
protocol=scgi socket=/tmp/cherokee-source1.sock
source!1!nick = Django 1
source!1!type = interpreter
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


listas at enelserver

Sep 19, 2009, 5:37 AM

Post #2 of 9 (456 views)
Permalink
Re: Unable to run Django [In reply to]

> Hi.
>
> I'm trying to run Django through Cherokee 0.99.24-1~jaunty~ppa1 on
> Ubuntu 9.04 server without success.
>
> To be sure I'm not doing something silly, I've purged the system and
> installed Cherokee from scratch. Then I've used the wizard to set up a
> minimal Django site using defaults wherever I could.
>
> The server starts without complaint, but serves only from the default
> "fall through" handler, and there's no scgi processes started.
>
> The config file below, minus icon- and mime-lines.
>
> Any tips on how to troubleshoot this thing? I've already tried running
> the interpreter line from a shell as the www-data user, and it seems
> to work as there's six processes listed by ps aux | grep python
> afterwards.
>
> Nils
>
>

Did you tried the Cherokee Django Wizard .. it really does magic.

Saludos

Leonel





_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


listas at enelserver

Sep 19, 2009, 5:55 AM

Post #3 of 9 (456 views)
Permalink
Re: Unable to run Django [In reply to]

> Hi.
>
> I'm trying to run Django through Cherokee 0.99.24-1~jaunty~ppa1 on
> Ubuntu 9.04 server without success.
>
> To be sure I'm not doing something silly, I've purged the system and
> installed Cherokee from scratch. Then I've used the wizard to set up a
> minimal Django site using defaults wherever I could.
>
> The server starts without complaint, but serves only from the default
> "fall through" handler, and there's no scgi processes started.
>
> The config file below, minus icon- and mime-lines.
>
> Any tips on how to troubleshoot this thing? I've already tried running
> the interpreter line from a shell as the www-data user, and it seems
> to work as there's six processes listed by ps aux | grep python
> afterwards.
>
> Nils
>


Do you have installed the package python-flup ??


Saludos

Leonel


_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


nils.grotnes at gmail

Sep 19, 2009, 7:16 AM

Post #4 of 9 (452 views)
Permalink
Re: Unable to run Django [In reply to]

Hi Leonel.

Yes, I used the wizard, and I do have Python-flup (1.0-1) installed.

Nils

>> I'm trying to run Django through Cherokee 0.99.24-1~jaunty~ppa1 on
>> Ubuntu 9.04 server without success.
>>
>> To be sure I'm not doing something silly, I've purged the system and
>> installed Cherokee from scratch. Then I've used the wizard to set up a
>> minimal Django site using defaults wherever I could.
>>
>> The server starts without complaint, but serves only from the default
>> "fall through" handler, and there's no scgi processes started.
>>
>> The config file below, minus icon- and mime-lines.
>>
>> Any tips on how to troubleshoot this thing? I've already tried running
>> the interpreter line from a shell as the www-data user, and it seems
>> to work as there's six processes listed by ps aux | grep python
>> afterwards.
> Do you have installed   the package   python-flup ??
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


public at openinformation

Sep 19, 2009, 8:11 AM

Post #5 of 9 (456 views)
Permalink
Re: Unable to run Django [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Nils,

not an expert on Django or Cherokee, but my setup is similar. I run my
local Django on Cherokee 0.99.24 from the PPA as well, on Ubuntu 9.04
Desktop.

For comparison, here is the Django-part from my cherokee.conf

vserver!20!rule!200!encoder!deflate = 0
vserver!20!rule!200!encoder!gzip = 0
vserver!20!rule!200!expiration = epoch
vserver!20!rule!200!handler = scgi
vserver!20!rule!200!handler!balancer = round_robin
vserver!20!rule!200!handler!balancer!source!1 = 2
vserver!20!rule!200!handler!change_user = 0
vserver!20!rule!200!handler!check_file = 0
vserver!20!rule!200!handler!error_handler = 1
vserver!20!rule!200!handler!pass_req_headers = 0
vserver!20!rule!200!handler!xsendfile = 0
vserver!20!rule!200!match = directory
vserver!20!rule!200!match!directory = /
vserver!20!rule!200!match!final = 1
vserver!20!rule!200!no_log = 0
vserver!20!rule!200!only_secure = 0

vserver!20!rule!100!handler = common
vserver!20!rule!100!match = default
vserver!20!rule!100!match!final = 1

The difference I see here to your setup is that you customized the
default handler to pass requests to Django. I left the default handler
and created an Directory handler for "/" to do that. Not sure if this is
important, though.

And here is the part that defines the Django information source:

source!2!host = 127.0.0.1:3033
source!2!interpreter =
/home/aguafuertes/geany-projects/attitude/manage.py runfcgi
method=threaded host=127.0.0.1 port=3033 protocol=scgi
source!2!nick = Django
source!2!type = interpreter

I'm really no expert here, but maybe the difference how the intepreter
is defined (socket vs. TCP port) gives you an idea what you can try. I
did not setup Django with the Wizard, btw.

Good luck
Gregor

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkq09I0ACgkQepJNjKMaIWXv6wCgjQb9OZKw7OvWb1O06FN8iVKQ
Ps4AoI9VqJG+M6RK2sVigpbawOTd76uQ
=+Lbc
-----END PGP SIGNATURE-----
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


nils.grotnes at gmail

Sep 19, 2009, 9:28 AM

Post #6 of 9 (448 views)
Permalink
Re: Unable to run Django [In reply to]

Hi Gregor.

Sorry for the personal email, Gmail unfortunately makes it really easy
to make that mistake...

Here it is again, with some additions.

> not an expert on Django or Cherokee, but my setup is similar. I run my
> local Django on Cherokee 0.99.24 from the PPA as well, on Ubuntu 9.04
> Desktop.

Thanks, it's good to know it can be done.

> For comparison, here is the Django-part from my cherokee.conf

(snipped, but not forgotten...)

What is your document root set as? I've tried both /var/www and
/home/nils/mysite with no difference.

> The difference I see here to your setup is that you customized the
> default handler to pass requests to Django. I left the default handler
> and created an Directory handler for "/" to do that. Not sure if this is
> important, though.

Rather, the wizard did. It added a new virtual server, but I think the
main difference with your setup may be the "match" bit. I added a new
target above the default scgi target, similar to yours, but with no
difference.

> And here is the part that defines the Django information source:

Thanks for the example, I will try to see if switching from pipes to
"tubes" will help. (It didn't.)

> I'm really no expert here, but maybe the difference how the intepreter
> is defined (socket vs. TCP port) gives you an idea what you can try. I
> did not setup Django with the Wizard, btw.

I'd prefer to fix the wizard setup though, if it's possible. That
could hopefully be useful for more than just me.

It seems to me the added virtual server, though above the default one,
is never called. There's nothing logged for that server ever, only for
the default one.

I'm stumped.

Nils
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


nils.grotnes at gmail

Sep 19, 2009, 10:12 AM

Post #7 of 9 (450 views)
Permalink
Re: Unable to run Django [In reply to]

I thought I had found it...

After reading this bug report:
https://bugs.launchpad.net/ubuntu/+source/cherokee/+bug/378772

I looked into /usr/bin for spawn-fcgi. It turns out this is a link to
/etc/alternatives/spawn-fcgi. However, that file does not exist.
There's however a binary file called spawn-fcgi.standalone in
/usr/bin. I linked to it (using sudo update-alternatives --set
spawn-fcgi /usr/bin/spawn-fcgi.standalone) but unfortunately, that did
not seem to help with my Cherokee+Django problem, I even rebooted the
server to be certain.

Nils
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


public at openinformation

Sep 19, 2009, 10:14 AM

Post #8 of 9 (450 views)
Permalink
Re: Unable to run Django [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Nils


> Sorry for the personal email, Gmail unfortunately makes it really easy
> to make that mistake...
>

no problem.

> Here it is again, with some additions.
>
>> not an expert on Django or Cherokee, but my setup is similar. I run my
>> local Django on Cherokee 0.99.24 from the PPA as well, on Ubuntu 9.04
>> Desktop.
>
> Thanks, it's good to know it can be done.

I also have it running un Ubuntu 8.04 server and just checked, the
Django setup is identical to my local one.

> What is your document root set as? I've tried both /var/www and
> /home/nils/mysite with no difference.
>

I use /home/aguafuertes/.../ - no special permissions set, as far as I
can tell.

> Thanks for the example, I will try to see if switching from pipes to
> "tubes" will help. (It didn't.)

Another thing I saw is that you prefixed the interpreter input in the
Django information source with "python" - mine looks just like this
"/home/aguafuertes/geany-projects/attitude/manage.py runfcgi
method=threaded host=127.0.0.1 port=3033 protocol=scgi"

> It seems to me the added virtual server, though above the default one,
> is never called. There's nothing logged for that server ever, only for
> the default one.

Ok, that would also be an explanation ;) Can't really help you there,
but there should be enough experts on the list.

> I'm stumped.

Good luck.
Gregor
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkq1EWYACgkQepJNjKMaIWW26gCdEgn3jWDsLC03+LhjTibT1cDJ
Xs4AoKX+Fpt/gUmP+e84lcTUN8jdLLyV
=2pFW
-----END PGP SIGNATURE-----
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


listas at enelserver

Sep 19, 2009, 12:20 PM

Post #9 of 9 (451 views)
Permalink
Re: Unable to run Django [In reply to]

> I thought I had found it...
>
> After reading this bug report:
> https://bugs.launchpad.net/ubuntu/+source/cherokee/+bug/378772
>
> I looked into /usr/bin for spawn-fcgi. It turns out this is a link to
> /etc/alternatives/spawn-fcgi. However, that file does not exist.
> There's however a binary file called spawn-fcgi.standalone in
> /usr/bin. I linked to it (using sudo update-alternatives --set
> spawn-fcgi /usr/bin/spawn-fcgi.standalone) but unfortunately, that did
> not seem to help with my Cherokee+Django problem, I even rebooted the
> server to be certain.
>
> Nils
> _______________________________________________
> Cherokee mailing list
> Cherokee [at] lists
> http://lists.octality.com/listinfo/cherokee
>


There is a spawn-fcgi in the cherokee PPA for jaunty


Saludos


Leonel


_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.