TOW (Trac On Windows) Blog

June 18, 2008

You met 500 Internal Server error?

Filed under: Trouble Shooting — Tags: — yeoupooh @ 3:19 am

Opps.

[Wed Jun 18 11:48:43 2008] [error] [client …] mod_python (pid=2980, interpreter=’tow.localhost’, phase=’PythonHandler’, handler=’trac.web.modpython_frontend’): Application error
[Wed Jun 18 11:48:43 2008] [error] [client …] ServerName: ‘tow.localhost’
[Wed Jun 18 11:48:43 2008] [error] [client …] DocumentRoot: ‘C:/TOW/Apache/htdocs’
[Wed Jun 18 11:48:43 2008] [error] [client …] URI: ‘/projects/…/ticket/133’
[Wed Jun 18 11:48:43 2008] [error] [client …] Location: ‘/projects’
[Wed Jun 18 11:48:43 2008] [error] [client …] Directory: None
[Wed Jun 18 11:48:43 2008] [error] [client …] Filename: ‘C:/TOW/Apache/cgi-bin/trac.cgi’
[Wed Jun 18 11:48:43 2008] [error] [client …] PathInfo: ‘/…/ticket/133’
[Wed Jun 18 11:48:43 2008] [error] [client …] Traceback (most recent call last):
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\Lib\\site-packages\\mod_python\\importer.py”, line 1537, in HandlerDispatch\n    default=default_handler, arg=req, silent=hlist.silent)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\Lib\\site-packages\\mod_python\\importer.py”, line 1229, in _process_target\n    result = _execute_target(config, req, object, arg)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\Lib\\site-packages\\mod_python\\importer.py”, line 1128, in _execute_target\n    result = object(arg)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\Lib\\site-packages\\trac\\web\\modpython_frontend.py”, line 87, in handler\n    gateway.run(dispatch_request)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\Lib\\site-packages\\trac\\web\\wsgi.py”, line 87, in run\n    response = application(self.environ, self._start_response)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\Lib\\site-packages\\trac\\web\\main.py”, line 416, in dispatch_request\n    env.log.warn(e)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\logging\\__init__.py”, line 983, in warning\n    apply(self._log, (WARNING, msg, args), kwargs)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\logging\\__init__.py”, line 1079, in _log\n    self.handle(record)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\logging\\__init__.py”, line 1089, in handle\n    self.callHandlers(record)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\logging\\__init__.py”, line 1126, in callHandlers\n    hdlr.handle(record)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\logging\\__init__.py”, line 642, in handle\n    self.emit(record)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\Lib\\logging\\handlers.py”, line 819, in emit\n    self.handleError(record)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\logging\\__init__.py”, line 693, in handleError\n    traceback.print_exception(ei[0], ei[1], ei[2], None, sys.stderr)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\traceback.py”, line 125, in print_exception\n    print_tb(tb, limit, file)
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\traceback.py”, line 70, in print_tb\n    if line: _print(file, ‘    ‘ + line.strip())
[Wed Jun 18 11:48:43 2008] [error] [client …]   File “C:\\TOW\\Python\\lib\\traceback.py”, line 13, in _print\n    file.write(str+terminator)
[Wed Jun 18 11:48:43 2008] [error] [client …] IOError: [Errno 9] Bad file descriptor

Error messages is like above? Then follow this.

TOW is set to Windows Event Log for logging by default. Sometimes Windows Event logging occurs 500 Internal Server error. I don’t know why. But it’s suspicious.

Change logging setting to anything but Windows event log. Edit trac.ini like below or visit Admin page > General > Logging.

[logging]
log_level = WARNING
log_type = file

Hope this helps.

Advertisements

Create a free website or blog at WordPress.com.