Hello everybody,

 

Who can help me, the desprite trac-beginner!!!

 

I fell in the hole of configuring trac (mod_wsgi + postrgre + trac 0.12)

 

when i try to run trac on apache web server access via
"http://192.168.xx.xxx";  i got these stuff:

 

Traceback (most recent call last):
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/web/api.py", line 498, in send_error
    data, 'text/html')
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/web/chrome.py", line 977, in render_template
    message = req.session.pop('chrome.%s.%d' % (type_, i))
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/web/api.py", line 303, in __getattr__
    value = self.callbacks[name](self)
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/web/main.py", line 254, in _get_session
    return Session(self.env, req)
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/web/session.py", line 193, in __init__
    self.get_session(sid)
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/web/session.py", line 214, in get_session
    super(Session, self).get_session(sid, authenticated)
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/web/session.py", line 63, in get_session
    with self.env.db_query as db:
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/db/api.py", line 165, in __enter__
    db = DatabaseManager(self.env).get_connection(readonly=True)
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/db/api.py", line 250, in get_connection
    db = self._cnx_pool.get_cnx(self.timeout or None)
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/db/pool.py", line 207, in get_cnx
    return _backend.get_cnx(self._connector, self._kwargs, timeout)
  File
"/usr/local/lib/python2.6/dist-packages/Trac-0.13dev_r10845-py2.6.egg/tr
ac/db/pool.py", line 128, in get_cnx
    raise TimeoutError(errmsg)
TimeoutError: Unable to get database connection within 0 seconds.
(TracError: Database "/var/local/trac_test/trac/db/trac.db" not found.)

 

my trac.wsgi

 

import sys

sys.stdout = sys.stderr

 

import trac.db.postgres_backend

trac.db.postgres_backend.PostgreSQLConnection.poolable = False

 

import os

os.environ['TRAC_ENV_PARENT_DIR'] = '/var/local//trac_test/trac'

os.environ['PYTHON_EGG_CACHE'] = '/var/local/trac_test/python-eggs'

 

import trac.web.main

 

application = trac.web.main.dispatch_request

 

 

 

my httpd.conf

 

 

WSGIScriptAlias / /var/local/trac_test/trac/web/trac.wsgi

 

<directory /var/local/trac_test/trac/web>

WSGIProcessGroup trac

WSGIApplicationGroup %{GLOBAL}

SetEnv trac.env_parent_dir /var/local/trac_test/trac

Order deny,allow

Allow from all

</directory>

 

<LocationMatch />

AuthType Basic

AuthName "mytrac"

AuthUserFile /var/local/trac_test/trac/.trac-htpasswd

Require valid-user

</LocationMatch>

 

 

my trac.ini(db connection string):

 

database = postgres://user:pwd@localhost/trac-db

debug_sql = False

 

 

i checked in my file directory, there is no directory named "db", no
file named "trac.db". That means, by running "trac-admin ... initenv"
the database in "/var/local/trac_test/trac/db/trac.db" was not  built,
right? Who can tell me, whats wrong?

 

 

Thanks a lot

 

Lili

 

 

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

Reply via email to