Using Windows Vista with IPv6 enabled (and functional), Turbogears by default will bind to the IPv6 address and will not listen on the IPv4 address(es).
Specifying to listen on a specific IPv4 address works (i.e. 222.222.222.222 or 127.0.0.1), but it fails when server.socket_host is set to '0.0.0.0' (the code for INADDR_ANY, any IPv4 interface) with the following error:
2008-07-14 09:56:01,351 cherrypy.msg INFO HTTP: Port 8080 not bound on '0.0.0.0'
Unhandled exception in thread started by <bound method Server._start of <cherrypy._cpserver.Server object at 0x02D7C310>
Traceback (most recent call last):
File "c:\python\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cpserver.py", line 79, in _start
self.start_http_server()
File "c:\python\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cpserver.py", line 127, in start_http_server
self.wait_for_http_ready()
File "c:\python\lib\site-packages\cherrypy-2.3.0-py2.5.egg\cherrypy\_cpserver.py", line 162, in wait_for_http_ready
raise cherrypy.NotReady?("Port not bound.")
cherrypy._cperror.NotReady?: Port not bound.
If in development mode, the application will continue to run, I suspect because of the autoreload thread keeping things alive. In production mode, this exception terminates the service.
This issue is a bug in cherrypy which appears to have been fixed in more recent versions. Robust IPv6 support is yet another reason to consider the move to CherryPy? 3.0+ with TG 1.1.