Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #291 (closed defect: invalid)

Opened 13 years ago

Last modified 10 years ago

Unable to run TG on unix domain socket

Reported by: cliff@… Owned by: anonymous
Priority: normal Milestone:
Component: Deployment Version:
Severity: normal Keywords:


It appears that due to a port check in startup.py and the fact that cherrypy checks to see if server.socketPort is set before checking for server.socketFile (which it appears TG does for you whether you want it to or not), it isn't currently possible to run TG on a local socket. If you are running TG behind another webserver such as Lighttpd, a socket would be the preferred way as it's faster and more secure.

Change History

comment:1 Changed 13 years ago by khorn

Can anyone verify that this is still a problem?

comment:2 Changed 13 years ago by max

  • Status changed from new to closed
  • Resolution set to worksforme

TurboGears correctly passes server settings to CherryPy?:

2006-10-12 08:29:56,058 cherrypy.msg INFO CONFIG:   server.socket_port: 8080
2006-10-12 08:29:56,058 cherrypy.msg INFO CONFIG:   server.socket_file: /tmp/z01

CherryPy? then complains about "Port is busy" but I don't see this as TurboGears issue. I close this ticket for now; reopen if there is something need to be fixed with TG itself.

comment:3 Changed 13 years ago by jorge.vargas

  • Status changed from closed to reopened
  • Resolution worksforme deleted
  • Milestone set to __future__

actually if this is a CP problem we should report it to their trac and close this ticket ones that one is fix.

comment:4 Changed 11 years ago by khorn

Was this ever reported to the CherryPy? folks?

Is it even an issue in CP3 or only in CP2?

comment:5 Changed 11 years ago by Chris Arndt

  • Status changed from reopened to closed
  • Resolution set to invalid

The problem is that CherryPy sets server.socket_port to a global default of 8080 when cherrypy.config is imported and and server.socket_port is not set.  cherrypy._cpserver.Server.wait_for_http_ready then checks is server_port evaluates to True and if it is will check that the port is usable.

So the correct solution is to set server.socket_port to None or '' in your deployment configuration if you also set server.socket_file. I'll updte the configuration reference with this info and close this ticket as invalid (user error).

comment:6 Changed 10 years ago by anonymous

  • Milestone __future__ deleted

Milestone future deleted

Note: See TracTickets for help on using tickets.