Cannot load Python bindings for SQLite -- Happens 1/10 on CentOs 5
|Reported by:||Owned by:|
TracError: Cannot load Python bindings for SQLite on the fresh CentOs 5 setup. This is happening about every tenth page reload. No matter which page i try to access. E.g. opening same admin page those 10 times → 1 of page load will fail. Any ideas what could be causing this?
As a background, i've been using trac for long in debian environments withouth trouble. Today I got my first touch to CentOS. I was given fresh Centos vmware setup with root access. So I started from clear table - withouth much understanding what I had in my hands. I had real troubles during trac-installation. At some point I used easy-install to compile latest python bindings with setup tools. Then I found that http://www.centos.org/modules/newbb/viewtopic.php?post_id=65680&topic_id=18086 told not ty try by your own with Trac 0.12, but use https://rpmrepo.org/RPMforge. So finally I took the right path:
sudo rpm --import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt sudo rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm cd /tmp wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.1-1.el5.rf.i386.rpm rpm -K rpmforge-release-0.5.1-1.el5.rf.*.rpm sudo rpm -i rpmforge-release-0.5.1-1.el5.rf.*.rpm sudo yum check-update sudo yum install trac
Created environment and passwd file
sudo htpasswd -cb /var/www/trac/.htpasswd admin <passwd> sudo trac-admin /var/www/trac/test initenv sudo chown -R apache.apache /var/www/trac
And modified apache default settings to refer to my trac env:
<Location /trac> SetHandler mod_python PythonInterpreter main_interpreter PythonHandler trac.web.modpython_frontend PythonOption TracEnvParentDir /var/www/trac PythonOption TracUriRoot /trac </Location> <LocationMatch "/trac/[^/]+/login"> AuthType Basic AuthName "Trac" AuthUserFile /var/www/trac/.htpasswd Require valid-user </LocationMatch>
Due SELinux, I got error
TracError: IOError: [Errno 13] Permission denied: '/var/www/trac/test/VERSION' and couldn't get rid of that. So I temporarily disabled SELinux with
sudo /usr/sbin/setenforce 0
Finally I had my test env there. And was able to log in & see admin page as well. But as said, sqlite bindings seem to fail to load about every 10th page load.
System info from about:
Trac: 0.12 Genshi: 0.6 mod_python: 3.2.8 pysqlite : 2.6.0 Python: 2.4.3 (#1, Sep 3 2009, 15:37:12) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] setuptools: 0.6c11 SQLite: 3.3.6 Subversion: 1.4.2 (r22196) jQuery: 1.4.2
I realized that there were some related bugs, but none of them purely the same: random reloads fail. So I guess this is worth of own bug. Any hints / links to workaronds would be very nice.