Tuesday, August 30, 2011

Django and Cherokee...

Hi all,

I'm having some trouble getting Cherokee to work with Django, and I noticed there are a number of Cherokee, Django users out there. I've posted questions on the Cherokee list, but there are some Django specific questions I have.

My project is called triagedb. It resides in the directory /var/www/NurseTriage/triagedb. In Cherokee I have a vServer for the NurseTriage directory in the physical file system (/var/www/NurseTriage). There is an index.html file in this directory and it is served normally. Within this vServer, I have a rule with web directory of /triagedb (physical directory is /var/www/NurseTriage/triagedb), and only accepts requests from port 443 (required for this app). This rule's handler is set to SCGI with the usual settings as configured by the Django wizard. It uses an information source called Django 11. This is the interpreter line for that source:

python /var/www/NurseTriage/triagedb/manage.py runfcgi protocol=scgi host= port=44945

After browsing to https://localhost/NurseTriage/triagedb/admin, I notice there is no instance of manage.py running. Do I need to launch the above command in init.d, or will Cherokee do it? Also, when I run the above command manually from the command prompt, I get 6 distinct processes running all on the same port. Is this normal?

Finally, I'm getting the following error in the Cherokee error log every time I hit the url for Django app:

{'type': "error", 'time': "29/08/2011 01:22:34.324", 'title': "epoll_ctl: ep_fd 19, fd 5: 'Bad file descriptor'", 'code': "fdpoll-epoll.c:140", 'error': "81", 'description': "The issue seems to be related to your system.", 'version': "1.0.14", 'compilation_date': "Dec 13 2010 21:49:35", 'configure_args': " '--host=x86_64-linux-gnu' '--build=x86_64-linux-gnu' '--enable-os-string=Ubuntu' '--enable-pthreads' '--prefix=/usr' '--localstatedir=/var' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--docdir=/usr/share/doc/cherokee-doc' '--with-wwwroot=/var/www' '--with-included-gettext' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-Wall -g -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS=' '--host=x86_64-linux-gnu' '--build=x86_64-linux-gnu' '--enable-os-string=Ubuntu' '--enable-pthreads' '--prefix=/usr' '--localstatedir=/var' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--docdir=/usr/share/doc/cherokee-doc' '--with-wwwroot=/var/www' '--with-included-gettext' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu' 'CFLAGS=-Wall -g -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions' 'CPPFLAGS='", 'backtrace': ""}

This suggests a permissions problem to me. What should the file owners and permissions be on the Django files? Root, or only something readable by root?

Thanx in advance,


You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment