install trac0.12.3 on centos6,httpd config file error info,help to resolve this.thanks

332 views
Skip to first unread message

Bin Hou

unread,
Jul 3, 2012, 4:19:17 AM7/3/12
to trac-...@googlegroups.com
/usr/lib64/python2.6/site-packages/mod_python/importer.py:32: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
/usr/lib64/python2.6/site-packages/mod_python/importer.py:1547: DeprecationWarning: catching of string exceptions is deprecated
  except apache.PROG_TRACEBACK, traceblock:
/usr/lib64/python2.6/site-packages/mod_python/importer.py:32: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import md5
[Tue Jul 03 15:58:56 2012] [notice] caught SIGTERM, shutting down
[Tue Jul 03 16:05:07 2012] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:httpd_t:s0
[Tue Jul 03 16:05:07 2012] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jul 03 16:05:07 2012] [notice] Digest: generating secret for digest authentication ...
[Tue Jul 03 16:05:07 2012] [notice] Digest: done
[Tue Jul 03 16:05:07 2012] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
[Tue Jul 03 16:05:07 2012] [notice] mod_python: using mutex_directory /tmp
[Tue Jul 03 16:05:07 2012] [notice] Apache/2.2.15 (Unix) DAV/2 mod_python/3.3.1 Python/2.6.6 SVN/1.6.11 configured -- resuming normal operations
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] mod_python (pid=22575, interpreter='trac_test', phase='PythonHandler', handler='trac.web.modpython_frontend'): Application error
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] ServerName: 'localhost'
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] DocumentRoot: '/var/www/html'
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] URI: '/trac_test'
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] Location: '/trac_test'
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] Directory: None
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] Filename: '/var/www/html/trac_test'
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] PathInfo: ''
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] Traceback (most recent call last):
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1538, in HandlerDispatch\n    default=default_handler, arg=req, silent=hlist.silent)
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 1203, in _process_target\n    module = import_module(module_name, path=path)
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "/usr/lib64/python2.6/site-packages/mod_python/importer.py", line 305, in import_module\n    return __import__(module_name, {}, {}, ['*'])
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "build/bdist.linux-x86_64/egg/trac/web/__init__.py", line 14, in <module>
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 311, in get_distribution\n    if isinstance(dist,Requirement): dist = get_provider(dist)
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 197, in get_provider\n    return working_set.find(moduleOrReq) or require(str(moduleOrReq))[0]
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 666, in require\n    needed = self.resolve(parse_requirements(requirements))
Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166]   File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 565, in resolve\n    raise DistributionNotFound(req)  # XXX put more info here
[Tue Jul 03 16:05:14 2012] [error] [client 10.5.1.166] DistributionNotFound: genshi

RjOllos

unread,
Jul 3, 2012, 1:11:06 PM7/3/12
to trac-...@googlegroups.com
You either don't have Genshi installed, or it is not on your Python path.

There are a number of guides for installing, some specific to CentOS. One of these should help you resolve the issue:

http://trac.edgewall.org/wiki/TracInstallPlatforms
http://recursive-design.com/blog/2008/07/27/installing-trac-on-centos/

Bin Hou

unread,
Jul 3, 2012, 10:03:42 PM7/3/12
to trac-...@googlegroups.com
install mod_python info,hope help me install mod_python by compiling source,thanks.

install info show:
  [root@hb opt]# yum install mod_python python-devel
  Loaded plugins: fastestmirror, refresh-packagekit, security 
  Determining fastest mirrors
  * base: ftp.neowiz.com
  * extras: ftp.neowiz.com
  * updates: ftp.neowiz.com
  Setting up Install Process
  No package mod_python available.
  Resolving Dependencies


2012/7/4 RjOllos <ry...@physiosonics.com>

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/MSNnHJfTznoJ.
To post to this group, send email to trac-...@googlegroups.com.
To unsubscribe from this group, send email to trac-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/trac-users?hl=en.

RjOllos

unread,
Jul 3, 2012, 11:11:35 PM7/3/12
to trac-...@googlegroups.com
On CentOS 5.8:

$ sudo yum search modpython
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
============================== Matched: modpython ==============================
mod_python.x86_64 : An embedded Python interpreter for the Apache Web server.
python26-mod_python.x86_64 : An embedded Python interpreter for the Apache HTTP



However, from what I hear, most people are running modwsgi these days and it is possible mod-python is not even available on CentOS 6.

Bin Hou

unread,
Jul 4, 2012, 9:52:03 PM7/4/12
to trac-...@googlegroups.com
install with mod_wsgi,but when open browser, errro info show,what's wrong?please help,thanks! 
error info(on web show):
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/web/api.py", line 441, in send_error
    data, 'text/html')
  File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 830, in render_template
    template = self.load_template(filename, method=method)
  File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 801, in load_template
    return self.templates.load(filename, cls=cls)
  File "/usr/lib64/python2.6/site-packages/genshi/template/loader.py", line 227, in load
    filename, encoding=encoding)
  File "/usr/lib64/python2.6/site-packages/genshi/template/loader.py", line 265, in _instantiate
    allow_exec=self.allow_exec)
  File "/usr/lib64/python2.6/site-packages/genshi/template/base.py", line 377, in __init__
    self.stream = list(self._prepare(self._parse(source, encoding)))
  File "/usr/lib64/python2.6/site-packages/genshi/template/base.py", line 444, in _prepare
    cls=cls or self.__class__)
  File "/usr/lib64/python2.6/site-packages/genshi/template/loader.py", line 229, in load
    self.callback(tmpl)
  File "build/bdist.linux-x86_64/egg/trac/web/chrome.py", line 794, in <lambda>
    Translator(translation.get_translations()).setup(template))
AttributeError: 'Translator' object has no attribute 'setup'

RjOllos

unread,
Jul 4, 2012, 9:57:27 PM7/4/12
to trac-...@googlegroups.com
Just a guess, but maybe you are missing Babel?

Bin Hou

unread,
Jul 4, 2012, 10:23:17 PM7/4/12
to trac-...@googlegroups.com
I already  have installed Bable=0.9.6 or Bable=0.9.5,the erro info don't change any;The trac is installed by compling,why?Thanks!

2012/7/5 RjOllos <ry...@physiosonics.com>
Just a guess, but maybe you are missing Babel?

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/trac-users/-/stqyKK_6-J8J.

RjOllos

unread,
Jul 4, 2012, 10:47:27 PM7/4/12
to trac-...@googlegroups.com
The source of the error appears to be Genshi. The Translator object in Genshi 0.5 does not have a `setup` method. This method exists in Genshi 0.6, however. 

I think you somehow managed to install Trac 0.12.3 with Genshi 0.5. You need Genshi 0.6 or later. setup.py has an `install_requires = Genshi >= 0.6`, but from your earlier comments it look like you are installing from RPMs. I think the RPM for Trac would have to be properly configured to manage versioned dependencies.

Bin Hou

unread,
Jul 5, 2012, 2:29:48 AM7/5/12
to trac-...@googlegroups.com
error:"target wsgi script trac.wsgi cannot be loaded as python module" how to resolve this,I search google much,no good solutions.hope you give me a hand,thanks!

my .wsgi file
import sys
sys.stdout = sys.stderr
import os
os.environ['TRAC_ENV'] = '/var/www/trac/be_site'
os.environ['PYTHON_EGG_CACHE'] = '/var/www/trac/be_site/eggs'
import trac.web.main
application = trac.web.main.dispatch_request
                                                        
                                                    
htttpd log info:
 [Thu Jul 05 14:20:28 2012] [notice] Digest: done
[Thu Jul 05 14:20:28 2012] [notice] Apache/2.2.15 (Unix) DAV/2 mod_wsgi/3.3 Python/2.6.6 SVN/1.6.11 configured -- resuming normal operations
[Thu Jul 05 14:20:33 2012] [error] [client 10.5.1.166] mod_wsgi (pid=30445): Target WSGI script '/var/www/trac/trac.wsgi' cannot be loaded as Python module.
[Thu Jul 05 14:20:33 2012] [error] [client 10.5.1.166] mod_wsgi (pid=30445): Exception occurred processing WSGI script '/var/www/trac/trac.wsgi'.
[Thu Jul 05 14:20:33 2012] [error] [client 10.5.1.166] Traceback (most recent call last):
[Thu Jul 05 14:20:33 2012] [error] [client 10.5.1.166]   File "/var/www/trac/trac.wsgi", line 9, in <module>
[Thu Jul 05 14:20:33 2012] [error] [client 10.5.1.166]     import trac.web.main
[Thu Jul 05 14:20:33 2012] [error] [client 10.5.1.166] ImportError: No module named trac.web.main

sys.paht:
[
 '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg',
 '/usr/lib/python2.6/site-packages/Genshi-0.6-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/TracGrowlPlugin-0.2.1dev_r3950-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/TracDateField-1.1.0_r11277-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/BreadCrumbsNav-0.2_r10896-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/TracCustomFieldAdmin-0.2.8_r11597-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/IniAdmin-0.2_r10454-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/TracWysiwyg-0.11.0.4_r11158-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/Babel-0.9.6-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/TracAccountManager-0.3.2-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/Trac-0.12.4dev_r11092-py2.6.egg', 
 '/usr/lib/python2.6/site-packages/TracGanttCalendarPlugin-0.6.2-py2.6.egg', 
 '/usr/lib64/python26.zip', 
 '/usr/lib64/python2.6', 
 '/usr/lib64/python2.6/plat-linux2', 
 '/usr/lib64/python2.6/lib-tk', 
 '/usr/lib64/python2.6/lib-old',
 '/usr/lib64/python2.6/lib-dynload',
 '/usr/lib64/python2.6/site-packages',
 '/usr/lib64/python2.6/site-packages/PIL', 
 '/usr/lib64/python2.6/site-packages/gst-0.10',
 '/usr/lib64/python2.6/site-packages/gtk-2.0',
 '/usr/lib64/python2.6/site-packages/webkit-1.0',
 '/usr/lib/python2.6/site-packages'
]

RjOllos

unread,
Jul 5, 2012, 2:36:56 AM7/5/12
to trac-...@googlegroups.com
I have literally no experience working with python-wsgi, but since the issue is `ImportError: No module named trac.web.main`, I would have to assume that the Trac egg is not on the path as seen by the wsgi script.

Have you looked closely at these resources?:

Bin Hou

unread,
Jul 5, 2012, 6:09:48 AM7/5/12
to trac-...@googlegroups.com
The trac access more slowly,why? is it sqlite db?need some plugins?
Thank you very much.
330.gif

Matthew Caron

unread,
Jul 5, 2012, 9:18:12 AM7/5/12
to trac-...@googlegroups.com
On 07/05/2012 06:09 AM, Bin Hou wrote:
> The trac access more slowly,why? is it sqlite db?need some plugins?
> Thank you very much.

If several people are using Trac at the same time with a sqlite backend,
it can be slow, and eventually will start to time out. In my experience,
that seems to be around 5 heavy users.
--
Matthew Caron, Build Engineer
Sixnet, a Red Lion business | www.sixnet.com
+1 (518) 877-5173 x138 office


RjOllos

unread,
Jul 5, 2012, 9:40:20 AM7/5/12
to trac-...@googlegroups.com
On Thursday, July 5, 2012 3:09:48 AM UTC-7, Bin Hou wrote:
The trac access more slowly,why? is it sqlite db?need some plugins?

We need more info to be able to properly help you:
 - You have upgraded? Which version were you running previously.
 - As Matthew suggested, how many users do you have registered?
 - What plugins, if any, are installed?
 - What is the before and after load time for accessing Trac resources? Is it a specific module that is slow, such as the ticket module, or are all modules slow to load?

Bin Hou

unread,
Jul 9, 2012, 2:32:50 AM7/9/12
to trac-...@googlegroups.com
How to resolve "TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'",
list info:
[root@beTrac besite_mysql]# trac-admin /var/www/trac/besite_mysql initenv

database connect string [sqlite:db/trac.db]> mysql://trac:tracbe@localhost:3306/besite

create and initlize
'/var/www/trac/besite_mysql' execute initenv fail。 
create fail。
unsupported operand type(s) for /: 'int' and 'NoneType'
Traceback (most recent call last):
  File "build/bdist.linux-x86_64/egg/trac/admin/console.py", line 437, in do_initenv
    options=options)
  File "build/bdist.linux-x86_64/egg/trac/env.py", line 214, in __init__
    self.create(options)
  File "build/bdist.linux-x86_64/egg/trac/env.py", line 402, in create
    DatabaseManager(self).init_db()
  File "build/bdist.linux-x86_64/egg/trac/db/api.py", line 146, in init_db
    connector.init_db(**args)
  File "build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py", line 106, in init_db
    for stmt in self.to_sql(table, utf8_size=utf8_size):
  File "build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py", line 155, in to_sql
    utf8_size=utf8_size))
  File "build/bdist.linux-x86_64/egg/trac/db/mysql_backend.py", line 119, in _collist
    limit_col = 767 / utf8_size
TypeError: unsupported operand type(s) for /: 'int' and 'NoneType'

Jun Omae

unread,
Jul 9, 2012, 4:27:41 AM7/9/12
to trac-...@googlegroups.com
Hi,

It seems that your MySQL database is NOT configured with utf8 charset.
MySQL database for Trac must be configured with utf8 charset and
utf8_bin collation.

See also http://trac.edgewall.org/wiki/MySqlDb#MySQL
--
Jun Omae <jun...@gmail.com> (大前 潤)

Bin Hou

unread,
Jul 9, 2012, 4:55:04 AM7/9/12
to trac-...@googlegroups.com
trac with mysql,when login,no have authentication.why?thanks!
start info:
[root@beTrac conf]# tracd --port 8000 --auth="besite_mysql,/var/www/trac/besite_mysql/conf/trac.htpasswd,localhost"  /var/www/trac/besite_mysql/
Warning: invalid digest line in /var/www/trac/besite_mysql/conf/trac.htpasswd: houzb:U/Ul55k2X4fIA
Warning: invalid digest line in /var/www/trac/besite_mysql/conf/trac.htpasswd: admin:g0/Qr57XJJnSQ
Warning: found no users in realm: localhost
Server starting in PID 15837.
Using HTTP/1.1 protocol version

the red words,what's meaning?how to resolve?thanks!

Jun Omae

unread,
Jul 9, 2012, 5:09:02 AM7/9/12
to trac-...@googlegroups.com
It seems it needs `--basic-auth` option or a htdigest password file.

See http://trac.edgewall.org/wiki/TracStandalone#UsingAuthentication
> --
> You received this message because you are subscribed to the Google Groups
> "Trac Users" group.
> To post to this group, send email to trac-...@googlegroups.com.
> To unsubscribe from this group, send email to
> trac-users+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/trac-users?hl=en.



Bin Hou

unread,
Jul 10, 2012, 2:54:22 AM7/10/12
to trac-...@googlegroups.com
Warning:

    Error with navigation contributor "TicketCalendarPlugin"
    Error with navigation contributor "TicketGanttChartPlugin"
    Error with navigation contributor "AdminModule"
    Error with navigation contributor "SearchModule"
    Error with navigation contributor "QueryModule"
    Error with navigation contributor "ReportModule"
    Error with navigation contributor "RoadmapModule"
    Error with navigation contributor "TicketModule"
    Error with navigation contributor "TimelineModule"
    Error with navigation contributor "BrowserModule"
    Error with navigation contributor "WikiModule"
    Can't synchronize with repository "(default)" (Cannot load Python bindings for MySQL). Look in the Trac log for more information.

Trac Error

Cannot load Python bindings for MySQL

how to load Python bindings for MySQL?

RjOllos

unread,
Jul 10, 2012, 11:08:03 AM7/10/12
to trac-...@googlegroups.com
I would guess that you are missing the mysql python bindings.

Steffen Hoffmann

unread,
Jul 17, 2012, 6:06:49 PM7/17/12
to trac-...@googlegroups.com
Sorry, did you consider following the explicit advise given in the
quoted output above, especially when it tells you to "Look in the Trac
log for more information."?

Turn on DEBUG logging and most probably you'll see the problem more clearly.

Sincerely,

Steffen Hoffmann

Steffen Hoffmann

unread,
Jul 17, 2012, 6:13:14 PM7/17/12
to trac-...@googlegroups.com
Am 09.07.2012 10:55, wrote Bin Hou:
> trac with mysql,when login,no have authentication.why?thanks!
> start info:
> [root@beTrac conf]# tracd --port 8000
> --auth="besite_mysql,/var/www/trac/besite_mysql/conf/trac.htpasswd,localhost"
> /var/www/trac/besite_mysql/
> Warning: invalid digest line in
> /var/www/trac/besite_mysql/conf/trac.htpasswd: houzb:U/Ul55k2X4fIA
> Warning: invalid digest line in
> /var/www/trac/besite_mysql/conf/trac.htpasswd: admin:g0/Qr57XJJnSQ
> Warning: found no users in realm: localhost
> Server starting in PID 15837.
> Serving on 0.0.0.0:8000 <http://0.0.0.0:8000> view at http://127.0.0.1:8000/
> Using HTTP/1.1 protocol version
>
> the red words,what's meaning?how to resolve?thanks!

Hm, you have problems to understand the error wording or the underlying
concept of authentication? Authentication is not an easy playing field.

The error just informs you, that both lines in your trac.htpasswd
contain (syntactically) incorrect entries.

You may want to study the htpasswd file format a little more to produce
a valid file, or use a password manager [1] program to do that for you.

Yours,

Steffen Hoffmann

[1] http://trac-hacks.org/wiki/AccountManagerPlugin

Reply all
Reply to author
Forward
0 new messages