Ubuntu install trac 0.12.2

89 views
Skip to first unread message

Bogdan Stanciu

unread,
Mar 1, 2011, 8:54:51 AM3/1/11
to trac-...@googlegroups.com
Hi there,

I just wanted to share this page (not mine, maybe is well known, but I
just found it today) which brought me back on trac[ks] :-)

I was unable to install following the wiki, however this instructions
work like a charm (or almost):

http://trac.edgewall.org/wiki/Ubuntu-10.04-Bazaar

the end is for bazaar, but I got stuck well before that in my previous
attempts.

however, I noticed that during the install process, the command

trac-admin /var/tracprojects/newproject permission add admin TRAC_ADMIN

ends in error:

TimeoutError: Unable to get database connection within 0 seconds.
(TracError(u'Database "/var/tracprojects/newproject/db/trac.db" not
found.',))

it seems that trac-admin is looking for a SQLite db, while I use a mySQL db.

any suggestions?

thank you!
Bogdan

ubuntu 10.10
mySQL
py 2.6
apache 2
trac 0.12.2

PS I did manage to add the record to the db (via mySQL console) I am
just wandering whether this is a bug, or else.

Christian Boos

unread,
Mar 1, 2011, 9:02:59 AM3/1/11
to trac-...@googlegroups.com
On 3/1/2011 2:54 PM, Bogdan Stanciu wrote:
> Hi there,
>
> I just wanted to share this page (not mine, maybe is well known, but I
> just found it today) which brought me back on trac[ks] :-)
>
> I was unable to install following the wiki, however this instructions

What was the problem, exactly?

> work like a charm (or almost):
>
> http://trac.edgewall.org/wiki/Ubuntu-10.04-Bazaar
>
> the end is for bazaar, but I got stuck well before that in my previous
> attempts.
>
> however, I noticed that during the install process, the command
>
> trac-admin /var/tracprojects/newproject permission add admin TRAC_ADMIN
>
> ends in error:
>
> TimeoutError: Unable to get database connection within 0 seconds.
> (TracError(u'Database "/var/tracprojects/newproject/db/trac.db" not
> found.',))
>
> it seems that trac-admin is looking for a SQLite db, while I use a mySQL db.
>
> any suggestions?

Yes, check the permissions of your trac.ini file, it should be readable
by the user under which you're running the trac-admin command.

-- Christian

PS: we're working on a fix, http://trac.edgewall.org/ticket/10044

Bogdan Stanciu

unread,
Mar 1, 2011, 9:28:42 AM3/1/11
to trac-...@googlegroups.com
On 01. 03. 11 15:02, Christian Boos wrote:
> On 3/1/2011 2:54 PM, Bogdan Stanciu wrote:
>> Hi there,
>>
>> I just wanted to share this page (not mine, maybe is well known, but I
>> just found it today) which brought me back on trac[ks] :-)
>>
>> I was unable to install following the wiki, however this instructions
>
> What was the problem, exactly?
I know it is not "serious" from my side, but I can't really recall (it
happened a few months ago, when switched to ubuntu) I did not use trac
since, but today I decided to give it another try, and it worked with
those instructions I mentioned. I remember getting errors or code
instead of trac homepage. I appologise for the lack of precision.

>
>> work like a charm (or almost):
>>
>> http://trac.edgewall.org/wiki/Ubuntu-10.04-Bazaar
>>
>> the end is for bazaar, but I got stuck well before that in my previous
>> attempts.
>>
>> however, I noticed that during the install process, the command
>>
>> trac-admin /var/tracprojects/newproject permission add admin TRAC_ADMIN
>>
>> ends in error:
>>
>> TimeoutError: Unable to get database connection within 0 seconds.
>> (TracError(u'Database "/var/tracprojects/newproject/db/trac.db" not
>> found.',))
>>
>> it seems that trac-admin is looking for a SQLite db, while I use a
>> mySQL db.
>>
>> any suggestions?
>
> Yes, check the permissions of your trac.ini file, it should be
> readable by the user under which you're running the trac-admin command.

It has read/write acces for the user www-data. I admit this is the only
thing I did not check ("who" is www-data:-)) but all the rest works. the
initenv did write the db info into trac.ini, for example.

actually, not "all" the rest works, as I get a simillar error when trying
trac-admin /var/tracprojects/xxx repository resync "xxxx-repo"


TimeoutError: Unable to get database connection within 0 seconds.

(TracError(u'Database "/var/tracprojects/xxx/db/trac.db" not found.',))
after adding a new repo (I just wrote about this on the dev list)

do I miss anything?

>
> -- Christian
>
> PS: we're working on a fix, http://trac.edgewall.org/ticket/10044
>

thank you for the quick answer!
bogdan

Bogdan Stanciu

unread,
Mar 1, 2011, 9:38:11 AM3/1/11
to trac-...@googlegroups.com
On 01. 03. 11 15:02, Christian Boos wrote:
i just find out that www-data is a group (which includes my username,
btw)... it should be the apache group, according to the instructions...

Bogdan Stanciu

unread,
Mar 1, 2011, 9:46:40 AM3/1/11
to trac-...@googlegroups.com
On 01. 03. 11 15:02, Christian Boos wrote:
thank you!

I manually changed the permissions and it works... somehow it got just
the "owner" r/w, but the "group" and "others" were set to No Access.
only for trac.ini.

Reply all
Reply to author
Forward
0 new messages