Edgewall Software
Modify

Opened 9 years ago

Closed 9 years ago

#9473 closed defect (cantfix)

Cannot load Python bindings for SQLite -- Happens 1/10 on CentOs 5

Reported by: mapelkon@… Owned by:
Priority: normal Milestone:
Component: general Version: 0.12
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:

Description

I get 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.

Attachments (0)

Change History (2)

comment:1 by Christian Boos, 9 years ago

Are you using also mod_php by any chance? Depending on the activity of the httpd processes, mod_php and its own sqlite can be already loaded before Trac gets initialized, and this conflict prevents the pysqlite bindings to be loaded.

See #3112 and even http://bugs.centos.org/view.php?id=2046 for a workaround (disabling pdo_sqlite.so).

comment:2 by Christian Boos, 9 years ago

Resolution: cantfix
Status: newclosed

No feedback, closing (and this was an InstallationIssue in the first place).

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.