Hope I've done the right research on this one. Essentials:
WinXP SP2
Python 2.4.4
Latest stable release of CherryPy (v3.0.1). test.py runs ok
(except
for "No handlers could be found for logger
"cherrypy.error"").
Fresh installation of Apache 2.2.4
Mod_python 3.3.1. mod_python.testhandler works fine
(including with
mod_auth_sspi which is the point of all this!)
My existing application, running for several months now on
the
cherrypy standalone server, runs fine. I wanted to
authenticate users
via sspi and reckoned that mod_python / mod_sspi was the
simplest way
to do this. As mentioned above, the combination is ok for
the
mod_python test case.
I pulled the sample app & http.conf out of the docstring
for
_cpmodpy.py and consistently got a "Unrecoverable error
in the
server." with nothing in the Apache error.log. Took me
longer than it
should have done to realise that this was a cherrypy error,
not a
mod_python one (might be worth a cherrypy prefix on that
barebones
error message; happy to provide a path). And longer again to
think of
turning cherrypy logging on to an external filename. When I
did, I got
the traceback below:
<traceback>
[01/May/2007:14:34:37] Traceback (most recent call last):
File
"c:python24Libsite-packagescherrypy_cpmodpy.py&quo
t;, line 116,
in handler
setup(req)
File
"c:python24Libsite-packagescherrypy_cpmodpy.py&quo
t;, line 79,
in setup
func()
File "c:work_in_progressheatdevmyapp.py",
line 19, in
setup_server
cherrypy.engine.start(blocking=True)
File
"c:python24Libsite-packagescherrypy_cpengine.py&qu
ot;, line 84,
in start
self._set_signals()
File
"c:python24Libsite-packagescherrypy_cpengine.py&qu
ot;, line
298, in _set_signals
signal.signal(signal.SIGTERM, self.SIGTERM)
ValueError: signal only works in main thread
</traceback>
For completeness, this is the mini-app I'm using, although
it's cut-
and-pasted from _cpmodpy.py with only the error log added:
<myapp.py>
import cherrypy
class Root:
cherrypy.expose
def index(self):
return 'Hi there, Ho there, Hey there'
# We will use this method from the mod_python configuration
# as the entyr point to our application
def setup_server():
cherrypy.tree.mount(Root())
cherrypy.config.update({'log.error_file' : 'c:/temp/
cherrypy.log',
'environment': 'production',
'log.screen': False,
'show_tracebacks': False})
# You must start the engine in a non-blocking fashion
# so that mod_python can proceed
cherrypy.engine.start(blocking=False)
</myapp.py>
I'm a little stuck. It's possible something's changed in
the
mod_python setup since that example was written, but I
wouldn't know
where to look. Likewise on the cherrypy side. Any hints?
Thanks
TJG
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-users googlegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribe googlegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---
|