[Trac] Problem with trac configuration
I got problem with configuring trac (mod_wsgi + postrgre + trac 0.12) Everything works perfect, when trac is in standalone mode (racd -s -- port 8000 //home/project-home/trac). But when i try to access via mydomain.com/trac i see next: Traceback (most recent call last): File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/web/api.py, line 436, in send_error data, 'text/html') File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/web/chrome.py, line 827, in render_template message = req.session.pop('chrome.%s.%d' % (type_, i)) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/web/api.py, line 212, in __getattr__ value = self.callbacks[name](self) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/web/main.py, line 300, in _get_session return Session(self.env, req) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/web/session.py, line 162, in __init__ self.get_session(sid) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/web/session.py, line 183, in get_session super(Session, self).get_session(sid, authenticated) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/web/session.py, line 56, in get_session db = self.env.get_db_cnx() File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/env.py, line 328, in get_db_cnx return get_read_db(self) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/db/api.py, line 90, in get_read_db return _transaction_local.db or DatabaseManager(env).get_connection() File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/db/api.py, line 152, in get_connection return self._cnx_pool.get_cnx(self.timeout or None) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/db/pool.py, line 226, in get_cnx return _backend.get_cnx(self._connector, self._kwargs, timeout) File /usr/local/lib/python2.6/dist-packages/Trac-0.12.1-py2.6.egg/ trac/db/pool.py, line 146, in get_cnx raise TimeoutError(errmsg) TimeoutError: Unable to get database connection within 0 seconds. TracError(u'Database /PathToMyTrac/db/trac.db not found.',) my trac.wsgi import os import trac.db.postgres_backend trac.db.postgres_backend.PostgreSQLConnection.poolable = False os.environ['TRAC_ENV'] = '/home/project-home/trac/' os.environ['PYTHON_EGG_CACHE'] = '/home/project-home/trac/eggs' import trac.web.main application = trac.web.main.dispatch_request my httpd.conf WSGIScriptAlias /trac /home/project-home/deploy/cgi-bin/trac.wsgi Directory /home/project-home/deploy/cgi-bin WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all /Directory my conf.ini(db connection string): database = postgres://user:p...@localhost:5432/trac-db debug_sql = False -- You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-us...@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
Re: [Trac] Problem with trac configuration
On 12/03/2010 10:01 AM, Surryr wrote: I got problem with configuring trac (mod_wsgi + postrgre + trac 0.12) Everything works perfect, when trac is in standalone mode (racd -s -- port 8000 //home/project-home/trac). Five bucks says that your webserver can't read the config file. TimeoutError: Unable to get database connection within 0 seconds. TracError(u'Database /PathToMyTrac/db/trac.db not found.',) You're using postgres, but yet it's trying to open a sqlite DB (the default). This implies that it hasn't parsed the trac.ini. Can it read it? my conf.ini(db connection string): Shouldn't this be trac.ini? Or did that change with 0.12? -- Matthew Caron Build Engineer Sixnet | www.sixnet.com O +1 518 877 5173 Ext. 138 F +1 518 602 9209 matt.ca...@sixnet.com -- You received this message because you are subscribed to the Google Groups Trac Users group. To post to this group, send email to trac-us...@googlegroups.com. To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.
[Trac] Problem with Trac configuration (using mod_python)
Hi, For a demo project , I've installed the following on Fedora 1. Package trac-0.11.3-4.fc11.noarch 2. Package subversion-1.6.1-5.fc11.i586 (Two additional packages python-genshi and python-pygments were also installed as dependency with Trac) To run Trac using apache web server and mod_python, I've added the following lines to trac.conf file IfModule mod_python.c Location /trac/demo SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /srv/trac/demo SetEnv PYTHON_EGG_CACHE /tmp PythonInterpreter trac AuthType Basic AuthName demo AuthUserFile /opt/svn/svn-demo.htpasswd Require valid-user /Location /IfModule IfModule mod_dav.c Location /svn/demo DAV svn SVNPath /srv/svn/demo /Location /IfModule By default, on httpd.conf, the documentroot is /var/www/html and that value I did not change. Now when I try to access trac with the url http://host.com/trac/ demo, it does not load the images and css and gives the following error on the page No handler could be found for demo. Then I manually created subfolders 'trac' and 'demo' under /var/www/ html and now the error is gone but its still not loading the css and image files. But in the url if I put 'http://host.com/trac/demo/ abc' (or any text in place of abc), the page loads properly. So, my questions are 1. why do I need to manually create subfolders under /var/www/html where I've explicitly defined the location of my project under Location ? In that case what change should I made in the conf file so that I dont have to create the folders manually? (I used alias in httpd.conf but it didn't work). 2. what do I need to change in the configuration file if I want to access trac demo project with the url 'http://host.com/trac/demo' instead of 'http://host.com/trac/demo/abc'? (Note : when I put 'http://host.com/trac/demo/abc/xyz' then its giving 404 error though). Thanks, soumo. --~--~-~--~~~---~--~~ 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@googlegroups.com To unsubscribe from this group, send email to trac-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~--~~~~--~~--~--~---