Etch to Lenny and my trac went away

March 3, 2009

Tonight I upgraded my Debian Etch servers to Lenny. The whole procedure went like a clockwork, except one thing:
Trac

I access my trac via Apache. With the upgrade the /usr/share/trac/cgi-bin/trac.cgi in

#snip
ScriptAlias /trac /usr/share/trac/cgi-bin/trac.cgi
#snap

was gone. Sad but true.

So I’ve searched through the files that came with trac.
dpkg -L trac

It seems that everything moved to /usr/share/pyshared/trac, but still no trac.cgi. After a little bit more searching the file /usr/share/pyshared/trac/web/cgi_frontend.py came up.

By changing the rights to 755
chmod 755 /usr/share/pyshared/trac/web/cgi_frontend.py
and replacing the ScriptAlias with
ScriptAlias /trac /usr/share/pyshared/trac/web/cgi_frontend.py
it worked like a charm and trac showed up, telling me to do a
trac /path/to/project upgrade
on my project. After that everything was ready, yay!

Categories: Linux.

Comment Feed

8 Responses

  1. YoussefMarch 17, 2009 @ 00:13

    Thanks! Was extremely useful

  2. hi! i got this error:

    [Tue Mar 17 15:58:45 2009] [error] [client 192.168.1.1] access to /usr/share/pyshared/trac/web/cgi_frontend.py failed, reason: SSL connection required, referer: http://halbgasse.at/ase

    my provider dont allow https (ssl) :/
    so what should i do?

  3. I can only guess. Do you have access to the apache-config?
    If so, and you have no way to set up a ssl-connection, make sure there is no SSLRequireSSL (http://httpd.apache.org/docs/2.2/mod/mod_ssl.html#sslrequiressl) or anything similiar in it.

  4. PifiApril 25, 2009 @ 16:00

    Thanks for your post, it greatly helped me :)

  5. giannisApril 28, 2009 @ 11:57

    nice one there. saved me a lot of time.

    cheers mate

  6. LidoAugust 4, 2009 @ 09:32

    You have an error:

    wrong: trac /path/to/project upgrade
    right: trac-admin /path/to/project upgrade

    you need to replace the “trac” command with the “trac-admin” command

    But anyway, thanks for this nice hint!

  7. MsoutoOctober 19, 2009 @ 08:55

    I Have the following error… can you help me ?

    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] Traceback (most recent call last):
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] File “/usr/share/pyshared/trac/web/cgi_frontend.py”, line 75, in
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] run()
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] File “/usr/share/pyshared/trac/web/cgi_frontend.py”, line 71, in run
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] gateway.run(dispatch_request)
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/web/wsgi.py”, line 87, in run
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] response = application(self.environ, self._start_response)
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/web/main.py”, line 381, in dispatch_request
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] env = open_environment(env_path, use_cache=not run_once)
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/env.py”, line 571, in open_environment
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] env = Environment(env_path)
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/env.py”, line 190, in __init__
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] self.verify()
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/env.py”, line 249, in verify
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] fd = open(os.path.join(self.path, ‘VERSION’), ‘r’)
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] IOError
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] :
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] [Errno 2] No such file or directory: ‘/var/www/projetos/test/trac/htdocs/VERSION’
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125]
    [Mon Oct 19 03:53:06 2009] [error] [client 192.168.0.125] Premature end of script headers: cgi_frontend.py
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] Traceback (most recent call last):, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] File “/usr/share/pyshared/trac/web/cgi_frontend.py”, line 75, in , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] run(), referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] File “/usr/share/pyshared/trac/web/cgi_frontend.py”, line 71, in run, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] gateway.run(dispatch_request), referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/web/wsgi.py”, line 87, in run, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] response = application(self.environ, self._start_response), referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/web/main.py”, line 381, in dispatch_request, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] env = open_environment(env_path, use_cache=not run_once), referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/env.py”, line 571, in open_environment, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] env = Environment(env_path), referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/env.py”, line 190, in __init__, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] self.verify(), referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] File “/usr/lib/python2.5/site-packages/trac/env.py”, line 249, in verify, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] fd = open(os.path.join(self.path, ‘VERSION’), ‘r’), referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] IOError, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] : , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] [Errno 2] No such file or directory: ‘/var/www/projetos/test/trac/htdocs/VERSION’, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] Premature end of script headers: cgi_frontend.py, referer: http://trac/

  8. On the first sight you should start following this errors here:
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] [Errno 2] No such file or directory: ‘/var/www/projetos/test/trac/htdocs/VERSION’, referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] , referer: http://trac/
    [Mon Oct 19 03:53:07 2009] [error] [client 192.168.0.125] Premature end of script headers: cgi_frontend.py, referer: http://trac/



Some HTML is OK

or, reply to this post via trackback.