Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Trac: Users

Serious trac failures, which I can't fix

 

 

Trac users RSS feed   Index | Next | Previous | View Threaded


arantius at gmail

Nov 8, 2009, 10:31 AM

Post #1 of 10 (698 views)
Permalink
Serious trac failures, which I can't fix

I've had Trac installed for some time, on my Gentoo powered server. I
believe my most recent update has broken something. I've managed to
figure it out when stuff like this has happened in the past (it's
distressingly often) but this time I'm completely stuck.

If I run trac-admin, I get:

$ trac-admin
Traceback (most recent call last):
File "/usr/bin/trac-admin", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2595,
in <module>
working_set.require(__requires__)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 621,
in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 519,
in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: setuptools>=0.6b1

But:

$ easy_install --version
distribute 0.6.4

It's very much installed and working. Is this the problem?

$ python
Python 2.6.2 (r262:71600, Oct 24 2009, 16:29:54)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>> setuptools.__version__
'0.6'

I'd think "0.6" is newer than "0.6b1" (which I read as b1) but can
also see how it might fail such a check. Also, I know I have 0.6.4
installed, so that seems a bit strange.

Anyway, I only tried to run trac-admin because I was having more
serious problems, and wanted to try a fresh environment. In my
current environment, trying to access via the web, I just get a stack
trace:

Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 377,
in send_error
'text/html')
File "/usr/lib/python2.6/site-packages/trac/web/chrome.py", line
726, in render_template
req.session.pop('chrome.%s.%d' % (type_, i)))
File "/usr/lib/python2.6/site-packages/trac/web/api.py", line 195,
in __getattr__
value = self.callbacks[name](self)
File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 264,
in _get_session
return Session(self.env, req)
File "/usr/lib/python2.6/site-packages/trac/web/session.py", line
152, in __init__
self.get_session(sid)
File "/usr/lib/python2.6/site-packages/trac/web/session.py", line
173, in get_session
super(Session, self).get_session(sid, authenticated)
File "/usr/lib/python2.6/site-packages/trac/web/session.py", line
48, in get_session
db = self.env.get_db_cnx()
File "/usr/lib/python2.6/site-packages/trac/env.py", line 273, in
get_db_cnx
return DatabaseManager(self).get_connection()
File "/usr/lib/python2.6/site-packages/trac/db/api.py", line 85, in
get_connection
connector, args = self._get_connector()
File "/usr/lib/python2.6/site-packages/trac/db/api.py", line 130, in
_get_connector
raise TracError('Unsupported database type "%s"' % scheme)
TracError: Unsupported database type "mysql"

I have no idea why it might say that. I definitely have the requisite
packages installed.

$ python
Python 2.6.2 (r262:71600, Oct 24 2009, 16:29:54)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>>

I debugged it for a while, and found that adding this line (to my
fastcgi wrapper script):

from trac.db import mysql_backend

Makes it load. But the navigation bar (normally: wiki, browser,
tickets, admin, etc) is completely empty. And the contents of the
page says:

Trac detected an internal error:

AttributeError: Cannot find an implementation of the "IRequestHandler"
interface named "WikiModule". Please update the option
trac.default_handler in trac.ini.

There was an internal error in Trac. It is recommended that you inform
your local Trac administrator and give him all the information he
needs to reproduce the issue.

To that end, you could ==== How to Reproduce ==== While doing a GET
operation on `/`, Trac issued an internal error. ''(please provide
additional details here)'' User Agent was: `Mozilla/5.0 (Windows; U;
Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET
CLR 3.5.30729)` ==== System Information ==== || '''Trac''' || `0.11.5`
|| || '''Python''' || `2.6.2 (r262:71600, Oct 24 2009, 16:29:54) `
[[br]] `[GCC 4.3.4]` || || '''setuptools''' || `0.6` || || '''MySQL'''
|| `server: "5.0.70", client: "5.0.70", thread-safe: 1` || ||
'''MySQLdb''' || `1.2.3c1` || || '''Genshi''' || `0.5.1` || ||
'''jQuery:''' || `1.2.6` || ==== Python Traceback ==== {{{ Traceback
(most recent call last): File "/usr/lib/python2.6/site-packages/trac/
web/main.py", line 444, in _dispatch_request dispatcher.dispatch(req)
File "/usr/lib/python2.6/site-packages/trac/web/main.py", line 171, in
dispatch chosen_handler = self.default_handler File "/usr/lib/
python2.6/site-packages/trac/config.py", line 498, in __get__
self.section, self.name)) AttributeError: Cannot find an
implementation of the "IRequestHandler" interface named "WikiModule".
Please update the option trac.default_handler in trac.ini. }}} a
ticket.

The action that triggered the error was:

GET: /

So then I added the line:

from trac.wiki import web_ui

Which convinces it to find the WikiModule, and Wiki pages show (and
'wiki' is in the nav bar). But the page says:

Warning: Can't synchronize with the repository (Unsupported version
control system "svn": Can't find an appropriate component, maybe the
corresponding plugin was not enabled? ). Look in the Trac log for more
information.

But again:

$ python
Python 2.6.2 (r262:71600, Oct 24 2009, 16:29:54)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import svn
>>> svn
<module 'svn' from '/usr/lib/python2.6/site-packages/svn/
__init__.pyc'>
>>>

I've got that and it works fine.

And in the wiki page, which used to work:

Error: Failed to load processor TitleIndex
No macro or processor named 'TitleIndex' found

Now, at the top, I mentioned an upgrade. I upgraded some packages on
Friday, but none of them were Trac. Trac has not been built since Oct
24, and it was Sep 23 when I upgraded from 0.11.2 to 0.11.5. These
problems have only been happening for about a day.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


arantius at gmail

Nov 10, 2009, 6:58 AM

Post #2 of 10 (661 views)
Permalink
Re: Serious trac failures, which I can't fix [In reply to]

On 11/08/09 13:31, arantius wrote:
> I've had Trac installed for some time, on my Gentoo powered server. I
> believe my most recent update has broken something...

I have worked around this issue with what I feel is a dirty fix:

$ diff -u /usr/share/webapps/trac/0.11.5/hostroot
/cgi-bin/trac.fcgi ./trac.fcgi
--- /usr/share/webapps/trac/0.11.5/hostroot/cgi-bin/trac.fcgi
2009-11-08 22:56:04.500157000 -0500
+++ ./trac.fcgi 2009-11-09 18:47:02.695491012 -0500
@@ -16,6 +16,29 @@
# Author: Jonas Borgström <jonas [at] edgewall>

try:
+ import os
+ os.environ['TRAC_ENV'] = "..."
+
+ # Trac doesn't import these on its own?
+ from trac.db import mysql_backend
+ from trac.mimeview import rst
+ from trac.ticket import query
+ from trac.ticket import report
+ from trac.versioncontrol import svn_fs
+ from trac.web import auth
+ from trac.wiki import macros
+
+ from trac import about
+ from trac import attachment
+
+ from trac.admin import web_ui
+ from trac.prefs import web_ui
+ from trac.search import web_ui
+ from trac.ticket import web_ui
+ from trac.timeline import web_ui
+ from trac.versioncontrol import web_ui
+ from trac.wiki import web_ui
+
from trac.web import fcgi_frontend
fcgi_frontend.run()
except SystemExit:

(Directory removed for privacy.) So I have this file as my fastcgi
launcher, which specifies this project's path. And I found that if I
add all these imports, suddenly things start to work. I'm sure there's
other things that I'm missing. And I have no idea why Trac isn't
importing these things as it needs them, anyway. But hopefully it's a
clue as to what is going wrong.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


cshelton at shelton-family

Nov 10, 2009, 7:21 AM

Post #3 of 10 (665 views)
Permalink
Re: Serious trac failures, which I can't fix [In reply to]

On Sun, Nov 8, 2009 at 1:31 PM, arantius <arantius [at] gmail> wrote:
>
> Now, at the top, I mentioned an upgrade.  I upgraded some packages on
> Friday, but none of them were Trac.  Trac has not been built since Oct
> 24, and it was Sep 23 when I upgraded from 0.11.2 to 0.11.5.  These
> problems have only been happening for about a day.
>

Is one of the packages that you upgraded python? If so, you will
likely need to reinstall everything related to python, including trac
and setuptools. Try running python-updater, and see if it updates any
packages for you.

chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


arantius at gmail

Nov 10, 2009, 9:29 AM

Post #4 of 10 (657 views)
Permalink
Re: Serious trac failures, which I can't fix [In reply to]

On 11/10/09 10:21, Chris Shelton wrote:
> Is one of the packages that you upgraded python? If so, you will
> likely need to reinstall everything related to python, including trac
> and setuptools. Try running python-updater, and see if it updates any
> packages for you.

Python updater was definitely run. In fact, in the past, I had problems
with Trac segfaulting with Hardened GCC and Python 2.6 [1], so I
downgraded to Python 2.5. I switched back and forth at least once after
these problems started, and re-ran python-updater.

For good measure, I've just:
* rebuilt python2.6
* did eselect python (was 2.5, now 2.6, done automatically by emerge)
* re-run python-updater (which rebuilt trac, and 20 other packages)
Since a new version of GCC was made available since [1], and 2.6 should
probably work now.

Everything acts just the same. Still complains about setuptools, and
unsupported database types.

[1] http://bugs.gentoo.org/show_bug.cgi?id=284219

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


arantius at gmail

Nov 16, 2009, 6:40 AM

Post #5 of 10 (624 views)
Permalink
Re: Serious trac failures, which I can't fix [In reply to]

On 11/10/09 12:29, Anthony Lieuallen wrote:
> [snip]
> Everything acts just the same. Still complains about setuptools, and
> unsupported database types.

Is there any further advice anyone can give me? Any other diagnostic
information I could provide?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


cshelton at shelton-family

Nov 17, 2009, 8:01 AM

Post #6 of 10 (622 views)
Permalink
Re: Serious trac failures, which I can't fix [In reply to]

Anthony,

On Mon, Nov 16, 2009 at 9:40 AM, Anthony Lieuallen <arantius [at] gmail> wrote:
>
> On 11/10/09 12:29, Anthony Lieuallen wrote:
>> [snip]
>> Everything acts just the same.  Still complains about setuptools, and
>> unsupported database types.
>
> Is there any further advice anyone can give me?  Any other diagnostic
> information I could provide?

Have you tried recompiling everything with gcc 4.3.4 as was suggested
in the last comment in the gentoo bug you mentioned? It sounds like
there are problems with using gcc 3.4.6 to compile python 2.6.

chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


arantius at gmail

Nov 17, 2009, 8:02 AM

Post #7 of 10 (625 views)
Permalink
Re: Serious trac failures, which I can't fix [In reply to]

On 11/17/09 11:01, Chris Shelton wrote:
> Have you tried recompiling everything with gcc 4.3.4 as was suggested
> in the last comment in the gentoo bug you mentioned? It sounds like
> there are problems with using gcc 3.4.6 to compile python 2.6.

Yes, I switched to 4.3.4 and re-built every package on my system some
short time before this issue began happening.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
To unsubscribe from this group, send email to trac-users+unsubscribe [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---


bricebr at gmail

Nov 18, 2009, 7:40 AM

Post #8 of 10 (615 views)
Permalink
Re: Serious trac failures, which I can't fix [In reply to]

where do you get eselect and emerge tools from, on ubuntu ? bitbake
package ?

On Nov 10, 6:29 pm, Anthony Lieuallen <arant...@gmail.com> wrote:
> On 11/10/09 10:21, Chris Shelton wrote:
>
> > Is one of the packages that you upgraded python?  If so, you will
> > likely need to reinstall everything related to python, including trac
> > and setuptools.  Try running python-updater, and see if it updates any
> > packages for you.
>
> Python updater was definitely run.  In fact, in the past, I had problems
> with Trac segfaulting with Hardened GCC and Python 2.6 [1], so I
> downgraded to Python 2.5.  I switched back and forth at least once after
> these problems started, and re-ran python-updater.
>
> For good measure, I've just:
> * rebuilt python2.6
> * did eselect python (was 2.5, now 2.6, done automatically by emerge)
> * re-run python-updater (which rebuilt trac, and 20 other packages)
> Since a new version of GCC was made available since [1], and 2.6 should
> probably work now.
>
> Everything acts just the same.  Still complains about setuptools, and
> unsupported database types.
>
> [1]http://bugs.gentoo.org/show_bug.cgi?id=284219

--

You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=.


arantius at gmail

Nov 18, 2009, 8:09 AM

Post #9 of 10 (626 views)
Permalink
Re: Re: Serious trac failures, which I can't fix [In reply to]

On 11/18/09 10:40, brice wrote:
> where do you get eselect and emerge tools from, on ubuntu ?

I don't. I run Gentoo.

--

You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=.


bricebr at gmail

Nov 19, 2009, 1:38 AM

Post #10 of 10 (617 views)
Permalink
Re: Re: Serious trac failures, which I can't fix [In reply to]

I wish I could !

On Wed, Nov 18, 2009 at 5:09 PM, Anthony Lieuallen <arantius [at] gmail>wrote:

> On 11/18/09 10:40, brice wrote:
> > where do you get eselect and emerge tools from, on ubuntu ?
>
> I don't. I run Gentoo.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To post to this group, send email to trac-users [at] googlegroups
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=.
>
>
>

--

You received this message because you are subscribed to the Google Groups "Trac Users" group.
To post to this group, send email to trac-users [at] googlegroups
For more options, visit this group at http://groups.google.com/group/trac-users?hl=.

Trac users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.