I tried to deploy my Pylons app using the instructions found here. This simply loads the default Pylons page when I visit the root of my domain. When I try to enter in any path, I receive the message
Unhandled Exception
An unhandled exception was thrown by the application.
When I view the error log for my application and the Apache error log, it seems Pylons always tries to route things to the error controller. However, note that the above message is not what my error controller should be outputting.
Any suggestions on what to check? I love developing with Pylons, but this is my first attempt at deployment. I've tried multiple configurations on multiple different web servers and I haven't had any luck.
UPDATE: Below is the config for my Pylons app (comments stripped to make it a bit shorter)
[DEFAULT]
smtp_server = localhost
error_email_from = paste@localhost
[server:main]
use = egg:PasteScript#flup_fcgi_thread
[app:main]
use = egg:linkdb
full_stack = true
static_files = true
cache_dir = %(here)s/data
beaker.session.key = linkdb
beaker.session.secret = b75f1813263ab9a082f67278daa26433
sqlalchemy.url = mysql://cclp:[email protected]/ccorl
authkit.setup.enable = True
authkit.setup.method = form, cookie
authkit.form.authenticate.user.type = linkdb.model.auth:MyUsersFromDatabase
authkit.form.authenticate.user.data = linkdb.model
authkit.cookie.secret = c2b47614b6eb46c4bd7842cae10f27e4
authkit.cookie.signoutpath = /users/logout
authkit.form.template.obj = linkdb.model.auth:make_template
set debug = false
[loggers]
keys = root, routes, linkdb, sqlalchemy
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = INFO
handlers = console
[logger_routes]
level = INFO
handlers =
qualname = routes.middleware
[logger_linkdb]
level = DEBUG
handlers =
qualname = linkdb
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(asctime)s,%(msecs)03d %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S
UPDATE: And here is the error log produced by the application (I'm paranoid, so I starred out the IP addresses)
DEBUG:authkit.authenticate.cookie:These cookies were found: []
DEBUG:authkit.authenticate.cookie:Our cookie 'authkit' value is therefore ''
DEBUG:authkit.authenticate.cookie:Remote addr '***.***.***.***', value '', include_ip True
DEBUG:pylons.wsgiapp:Setting up Pylons stacked object globals
DEBUG:pylons.wsgiapp:No controller found, returning 404 HTTP Not Found
DEBUG:authkit.authenticate.multi:Status: '404 Not Found', Headers: [('Content-Type', 'text/html; charset=UTF-8'), ('Content-Length', '154')]
DEBUG:authkit.authenticate.multi:Status checker recieved status '404 Not Found', headers [('Content-Type', 'text/html; charset=UTF-8'), ('Content-Length', '154')], intecept ['401']
DEBUG:authkit.authenticate.multi:Status checker returns False
DEBUG:authkit.authenticate.multi:Multi: No binding was found for the check
DEBUG:authkit.authenticate.cookie:These cookies were found: []
DEBUG:authkit.authenticate.cookie:Our cookie 'authkit' value is therefore ''
DEBUG:authkit.authenticate.cookie:Remote addr '***.***.***.***', value '', include_ip True
DEBUG:pylons.wsgiapp:Setting up Pylons stacked object globals
DEBUG:pylons.wsgiapp:Resolved URL to controller: u'error'
DEBUG:pylons.wsgiapp:Found controller, module: 'linkdb.controllers.error', class: 'ErrorController'
DEBUG:pylons.wsgiapp:Controller appears to be a class, instantiating
DEBUG:pylons.wsgiapp:Calling controller class with WSGI interface
UPDATE: This is the fcgi script my app is using
#!/usr/bin/env python
import logging
# Load the WSGI application from the config file
from paste.deploy import loadapp
wsgi_app = loadapp('config:/var/www/linkdb/production.ini')
# Deploy it using FastCGI
if __name__ == '__main__':
logging.basicConfig(filename='/var/www/linkdb/error.log', level=logging.DEBUG)
from flup.server.fcgi import WSGIServer
WSGIServer(wsgi_app).run()