Unhandled Exception on new server (Lighttpd + FastCGI)

37 views
Skip to first unread message

Derek Payton

unread,
Dec 5, 2007, 5:08:50 PM12/5/07
to Django users
Hello,

I was recently charged with installing a new development server at
work, and I'm having some trouble getting Django to work as FastCGI
under Lighttpd. The new server is setup identical to the old server,
except for some hardware upgrades and we moved from Ubuntu Dapper to
Ubuntu Gutsy.

Lighttpd starts with no problems, and so does the bash script which
starts the fastcgi daemon, but when I visit the URL
(ccsx.dev.ccsx.com) in my browser, I get an "Unhandled Exception"
error.

My startup script can be found here: http://dpaste.com/26896/ (Got it
from the docs, and it works well on the old server)
My lighttpd config can be found here: http://dpaste.com/26897/ (Same
as on the old server)
This is what's in the lighttpd error log: http://dpaste.com/26888/
(Could this be an issue with flup?)

At first, given what's in the log, I thought it was a flup problem. I
had originally installed flup via apt, so I uninstalled and
reinstalled it (again, via apt) but got the same error. So I
uninstalled it and reinstalled it using easy_install, and am still
getting the same error.

If I manually run "python manage.py runserver 0.0.0.0:8000" I can
visit ccsx.dev.ccsx.com:8000 and it works (aside from the /media/
folder, as Django isn't setup to serve that.)

By the way, I'm running the latest svn release of Django (currently
6897)

Anyone know what might be going on?

Chris Moffitt

unread,
Dec 5, 2007, 5:30:15 PM12/5/07
to django...@googlegroups.com
Sounds like this bug - http://code.djangoproject.com/ticket/6063

which was supposed to be fixed in [6895].  Are you sure you have the most recent checkout?

-Chris

Derek Payton

unread,
Dec 5, 2007, 5:38:08 PM12/5/07
to Django users
Chris,

derek@dev:~/django-trunk$ svn update
At revision 6897.

Any ideas?

Thank you,
--Derek

akaihola

unread,
Dec 5, 2007, 6:20:14 PM12/5/07
to Django users
Derek just noticed in IRC that [6895] is still failing on flatpages.

Derek Payton

unread,
Dec 5, 2007, 7:19:42 PM12/5/07
to Django users
Apparently there was an issue with my svn. I downgraded to a previous
revision (pre-6778), then back to trunk. Everything is working now,
except flatpages. Here's the error from lighttpd's log: http://dpaste.com/26918/

As per the last line in the log, I created a (blank) 404.html in my
templates directory, and it seemed to fix it.

However, is this the intended behavior (requiring a 404.html for
flatpages to work)? Should this be filed as a bug?

Thank you,
--Derek

Karen Tracey

unread,
Dec 5, 2007, 7:42:53 PM12/5/07
to django...@googlegroups.com

You need to provide a 404.html independent of whether you are using flatpages.  Users can enter whatever they like in a browser address bar, your site should respond with a sensible error message when they try to get to a page that doesn't exist.

http://code.djangoproject.com/ticket/3335

raised the issue of flatpages needing 404.html and was closed wontfix, so I'd say the current behavior is intended.

Karen


Derek Payton

unread,
Dec 5, 2007, 8:06:30 PM12/5/07
to Django users
Karen,

The ticket says, "If flatpages and DEBUG=False and 404.html doesn't
exist it throws the error".

I have DEBUG=True, and I'm getting an "Unhandled Exception" error, not
the default yellow "Django 404 Error with DEBUG=True"

Anyways, the issue now seems to be with the way flatpages handles
500's. Not sure if it's a bug nor not.

--Derek

On Dec 5, 4:42 pm, "Karen Tracey" <kmtra...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages