views:

854

answers:

2

I've deployed trac using apache/mod_wsgi (no SSL) (preferable, since the problem I'm facing with CGI is performance), and it works fine WITHOUT SVN integration. But I actually need SVN, so when I configure the repository path (i.e: repository_dir = c:/projects/svn/my_project) I can't even get my project TRAC to even open any of its pages.

On Mozilla Firefox shows a white page and on MS-IE shows a 'The page cannot be displayed' error as if the server has 'timed out'.

I've tried with mod_python (3.3.1) and the exact same problem happens. It works fine with CGI though.

I've also tried disabeling SVN authentication, thinking it might be a authentication conflict (I'm using Apache Basic Auth).

Environment:

  • Win 2000 Server SP 4;
  • Apache 2.2.10;
  • Python 2.5.2;
  • mod_wsgi revision 1018 2.3, py25_apache22;
  • Trac 0.12dev;
  • Subversion 1.5.3.

Configuration files:

  • Apache httpd.conf excerpt:
WSGIScriptAlias /trac "c:/projects/apache/trac.wsgi"

<Directory c:/projects/apache>
  WSGIApplicationGroup %{GLOBAL}
  Order deny,allow
  Allow from all
</Directory>
  • trac.wsgi:
import sys
sys.stdout = sys.stderr

import os
os.environ['TRAC_ENV_PARENT_DIR'] = 'c:/projects/trac'
os.environ['PYTHON_EGG_CACHE'] = 'c:/projects/eggs'

import trac.web.main

application = trac.web.main.dispatch_request
  • trac.ini excerpt:
repository_type = svn
repository_dir = c:/projects/svn/my_project

Any ideas???

Thanks, Lucas Fragomeni

+1  A: 

Solved!

I've aligned the SVN's dlls versions used by Apache and Python to the versions avaliable here: http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=8100 Also followed the instructions for SVN as mentioned here: http://trac.edgewall.org/wiki/TracInstall#VersionControlSystem

Step-by-step:

  1. Updated my Subversion to v1.5.5, Win32 binaries for Apache 2.2.x (avaliable at http://subversion.tigris.org/files/documents/15/44589/svn-win32-1.5.5.zip).

    1. Erased my old subversion and expanded the new one;
    2. Put the new one on the system path, so that Apache can see SVN dlls;
    3. Copyied 'mod_dav_svn.so' and 'mod_authz_svn.so' to Apache's modules directory.
  2. Updated the Python 2.5 bindings for Subversion on Win32 (avaliable at http://subversion.tigris.org/files/documents/15/44591/svn-win32-1.5.5_py.zip).

    1. Copyied the files from '\libsvn' to 'c:\Python25\Lib...\libsvn
    2. Followed the instructions to rename the libsvn/*.dll files to .pyd (since python 2.5 no longer reads dlls);
  3. Updated the Python 2.5 bindings installer for Win32 (avaliable at http://subversion.tigris.org/files/documents/15/44597/svn-python-1.5.5.win32-py2.5.exe).

    1. Installed the 'exe';
  4. Restart windows.

Just for the record... it didn't exactly happend in this order, nor it happend peacefully. I've spent the whole day strugling with different .zips/.exes/.dlls/.sos. So be sure to align SVN amongst all envolved parts before giving up that sollution.

Result: It worked and my Trac/SVN performance improved dramatically.

Lucas Fragomeni
+1  A: 

Actually, I had more problems after modifying my subversion repository. It stopped working again, with the same behaviour. So I tryied to 'resync' (since there was a log message regarding a differente revision from the cache) but nothing.

So I uninstalled everything and reinstalled it (including Apache), followed the step-by-step above PLUS:

  • Run a resync (trac-admin c:\projects\myproject resync) on my project;
  • Erased subversion's dlls installed by 'Python 2.5 bindings installer for Win32' from 'c:\Python25\Lib\site...\libsvn' and copyied subversion's dlls from 'c:\svn-win32-1.5.5\bin' to over it.

It worked (so far).

Any changes I'll notify.

Lucas Fragomeni