Thanks,
Eric
I'm sure it can, it'll just take a little glue. Try modifying cherryd as
follows:
sock_file = cherrypy.config.get('server.socket_file', None)
if sock_file:
bindAddress = sock_file
else:
fastcgi_port = cherrypy.config.get('server.socket_port', 4000)
fastcgi_bindaddr = cherrypy.config.get('server.socket_host',
'0.0.0.0')
bindAddress = (fastcgi_bindaddr, fastcgi_port)
Whether that works or not, please open a ticket. :)
http://www.cherrypy.org/newticket
Robert Brewer
fuma...@aminus.org
I tried with that, and the engine got as far as starting the monitor
threads before it blew up like so:
ENGINE Error in HTTP server: shutting down
Traceback (most recent call last):
File "/home/user/lib/python2.5/cherrypy/process/servers.py", line
73, in _start_http_thread
self.httpserver.start()
File "/home/user/lib/python2.5/cherrypy/process/servers.py", line
144, in start
self.fcgiserver.run()
File "build/bdist.linux-i686/egg/flup/server/fcgi.py", line 113, in
run
ret = ThreadedServer.run(self, sock)
File "build/bdist.linux-i686/egg/flup/server/threadedserver.py",
line 68, in run
self._installSignalHandlers()
File "build/bdist.linux-i686/egg/flup/server/threadedserver.py",
line 153, in _installSignalHandlers
signal.signal(sig, self._intHandler)
ValueError: signal only works in main thread
I'm testing this with a barebones "hello world" setup. Lighttpd is not
running at this point, not sure if that makes any difference.
python cherryd -c site.conf -f
site.conf
#####
[global]
server.socket_file: '/tmp/fcgi.sock'
tree.myapp: cherrypy.Application(wf.root, "/",)
wf/__init__.py
#####
import cherrypy
class HelloWorld:
@cherrypy.expose
def index(self):
return "Running on cherryd"
root = HelloWorld()
georgem has been doing some great work on getting this going--please try
out trunk and let us know how it goes.
Robert Brewer
fuma...@aminus.org
Starts beautifully. I'll try it with the full lighttpd stack when I
have a little more time, but I don't see why that wouldn't work.
Thanks a lot to georgem et al. for all the work! Cherrypy continues to
rock.
E
>
>
>
> Robert Brewer
> fuma...@aminus.org
>
>
> >
File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
line 95, in wait
raise self.interrupt
error: (95, 'Operation not supported')
The last time it died with that error, twice, and then got into an
infinite loop between wspbus.py:315 and wspbus.py:157, log and
publish, back and forth. I'm pasting everything below; the log/publish
loop continued until it hit max recursion depth...
Sorry to be a spoilsport,
Eric
[24/Jul/2008:05:17:56] ENGINE Error in HTTP server: shutting down
Traceback (most recent call last):
File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
line 73, in _start_http_thread
self.httpserver.start()
File "/home/taojian/lib/python2.5/cherrypy/wsgiserver/__init__.py",
line 1377, in start
raise socket.error, msg
error: (95, 'Operation not supported')
[24/Jul/2008:05:17:56] ENGINE Bus STOPPING
[24/Jul/2008:05:17:56] ENGINE HTTP Server
cherrypy._cpwsgi_server.CPWSGIServer('/tmp/fcgi.sock') already shut down
[24/Jul/2008:05:17:56] ENGINE Stopped thread 'Autoreloader'.
[24/Jul/2008:05:17:56] ENGINE Error in 'start' listener <bound method
Server.start of <cherrypy._cpserver.Server object at 0x9b6df4c>>
Traceback (most recent call last):
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
147, in publish
output.append(listener(*args, **kwargs))
File "/home/taojian/lib/python2.5/cherrypy/_cpserver.py", line 89,
in start
ServerAdapter.start(self)
File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
line 60, in start
self.wait()
File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
line 95, in wait
raise self.interrupt
error: (95, 'Operation not supported')
[24/Jul/2008:05:17:56] ENGINE Shutting down due to error in start
listener:
Traceback (most recent call last):
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
180, in start
self.publish('start')
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
147, in publish
output.append(listener(*args, **kwargs))
File "/home/taojian/lib/python2.5/cherrypy/_cpserver.py", line 89,
in start
ServerAdapter.start(self)
File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
line 60, in start
self.wait()
File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
line 95, in wait
raise self.interrupt
error: (95, 'Operation not supported')
[24/Jul/2008:05:17:56] ENGINE Bus STOPPING
[24/Jul/2008:05:17:56] ENGINE HTTP Server
cherrypy._cpwsgi_server.CPWSGIServer('/tmp/fcgi.sock') already shut down
[24/Jul/2008:05:17:56] ENGINE No thread running for Autoreloader.
[24/Jul/2008:05:17:56] ENGINE Stopped thread '_TimeoutMonitor'.
[24/Jul/2008:05:17:56] ENGINE Bus STOPPED
[24/Jul/2008:05:17:56] ENGINE Bus EXITING
[24/Jul/2008:05:17:56] ENGINE Bus EXITED
Exception in thread HTTPServer Thread-3 (most likely raised during
interpreter shutdown):
Traceback (most recent call last):
File "/usr/local/lib/python2.5/threading.py", line 460, in
__bootstrap
File "/usr/local/lib/python2.5/threading.py", line 440, in run
File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
line 88, in _start_http_thread
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
198, in exit
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
287, in stop
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
157, in publish
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
315, in log
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
157, in publish
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
315, in log
File "/home/taojian/lib/python2.5/cherrypy/process/wspbus.py", line
157, in publish
OK, first things first. http://www.cherrypy.org/changeset/2027 should
fix the infinite loop.
> [24/Jul/2008:05:17:56] ENGINE Error in HTTP server: shutting down
> Traceback (most recent call last):
> File "/home/taojian/lib/python2.5/cherrypy/process/servers.py",
> line 73, in _start_http_thread
> self.httpserver.start()
> File "/home/taojian/lib/python2.5/cherrypy/wsgiserver/__init__.py",
> line 1377, in start
> raise socket.error, msg
> error: (95, 'Operation not supported')
Why is wsgiserver being run? That should be unsubscribed when you choose
FastCGI (via the '-f' arg to cherryd).
Robert Brewer
fuma...@aminus.org
Thanks again!
Eric