Tricks and Tips about Systems/Network

August 2, 2010

Trac Error : timestamp out of range for platform time_t

Filed under: admins,Trac — Liju Mathew @ 7:58 pm

Recently I had an issue with trac installation. Initially I uses rmpforge repository to install trac on Centos5. Installation was easy and I could able to create trac instance. But I got the error on trac wiki area/ IT’s throws ” timestamp out of range for platform time_t” when I diply it over the Apache. Sucks !!!

Google shows lots of tickets opened for this error which I can’t understand :-( I tried many ways and I installed trac using easy_install package again. Whenever I ran the trac using tacd daemon it’s working perfectly but not through the same instance over the mod_python in Apache. One of my friends discovered that ‘web” and “tracd daemon” are showing different version even though it is sharing same trac folder.

I found there is an old version trac egg placed under “/usr/lib/python2.4/site-packages” which is mod_python being used. It’s yum trac installation issue and finally I did remove the yum trac installation. But the “easy_install” option has a problem with python setting on Centos/RH distribution. Mod_python will not extract/use the.egg files placed under " site-packages" folder. My option is, download the trac source code in zipped format and install it.

How do I install “easy_install” package,

[root@rc-040 installation]# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
[root@rc-040 installation]# tar -zxvf setuptools-0.6c11.tar.gz
[root@rc-040 installation]# cd setuptools-0.6c11
[root@rc-040 installation]# python ./setup.py install

[root@rc-13 trac]# wget ftp://ftp.edgewall.com/pub/trac/Trac-0.12.zip
[root@rc-13 trac]# easy_install --always-unzip Trac-0.12.zip

After restating the apache everything working like charm. My Apache configuration is,

ServerName trac.domain.com
ServerAdmin admin@domain.com
DocumentRoot /backup/trac/marketing
DirectoryIndex index.html

SetHandler mod_python
PythonInterpreter main_interpreter
PythonOption TracLocale en_GB.UTF8
PythonHandler trac.web.modpython_frontend
PythonOption TracEnv /backup/trac/marketing
PythonOption TracUriRoot /

AuthType Basic
AuthName "MyCompany Trac Server"
AuthUserFile /backup/trac/auth
Require valid-user

May 21, 2010

Upgrading SQLite from 2.x.y to 3.x.z

Filed under: admins,Trac — Liju Mathew @ 12:18 am

I’m using on Centos5.3 server.

1. Downloading and installing the latest sqllite package
#wget http://www.sqlite.org/sqlite-3.6.23.1.tar.gz
# tar-zxvf sqlite-3.6.23.1.tar.gz && cd sqlite-3.6.23.1
#mkdir bld
#cd bld
#../configure
#make && make install

2. Verify the python-binding is correctly configured.

[root@rc-170 bd]# python
Python 2.4.3 (#1, Jan 21 2009, 01:10:13)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>> import sqlite
>>> sqlite.version
’1.1.7′
>>> sqlite._sqlite.sqlite_version()
’3.6.23.1′
>>>

Theme: Rubric. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.