#237 closed setup (worksforme)
using email2trac via sendmail with MySQL DB backend producing error
Reported by: | grendelson AT gmail | Owned by: | bas |
---|---|---|---|
Priority: | blocker | Milestone: | |
Component: | email2trac | Version: | 2.0.2 |
Keywords: | Cc: |
Description
I am using Trac 0.12.3dev-r10609 and email2trac 2.0.2. I have MySQL as the DB backend and the trac env's are running fine. I have setup email2trac to test one env. and when I run
email2trac --project=cloud <msg.txt
it creates a new ticket just fine!
However every time I try to use
mail cloud <msg.txt
I get in /var/log/messages :
Mar 3 22:51:59 tracserver email2trac cloud: Traceback (most recent call last): Mar 3 22:51:59 tracserver email2trac cloud: File "/etc/smrsh/email2trac", line 2466, in ? tktparser.parse(sys.stdin) Mar 3 22:51:59 tracserver email2trac cloud: File "/etc/smrsh/email2trac", line 1538, in parse self.db = self.env.get_db_cnx() Mar 3 22:51:59 tracserver email2trac cloud: File "/usr/lib/python2.4/site-packages/Trac-0.12.3dev_r10609-py2.4.egg/trac/env.py", line 328, in get_db_cnx return get_read_db(self) Mar 3 22:51:59 tracserver email2trac cloud: File "/usr/lib/python2.4/site-packages/Trac-0.12.3dev_r10609-py2.4.egg/trac/db/api.py", line 90, in get_read_db return _transaction_local.db or DatabaseManager(env).get_connection() Mar 3 22:51:59 tracserver email2trac cloud: File "/usr/lib/python2.4/site-packages/Trac-0.12.3dev_r10609-py2.4.egg/trac/db/api.py", line 152, in get_connection return self._cnx_pool.get_cnx(self.timeout or None) Mar 3 22:51:59 tracserver email2trac cloud: File "/usr/lib/python2.4/site-packages/Trac-0.12.3dev_r10609-py2.4.egg/trac/db/pool.py", line 227, in get_cnx return _backend.get_cnx(self._connector, self._kwargs, timeout) Mar 3 22:51:59 tracserver email2trac cloud: File "/usr/lib/python2.4/site-packages/Trac-0.12.3dev_r10609-py2.4.egg/trac/db/pool.py", line 147, in get_cnx raise TimeoutError(errmsg) Mar 3 22:51:59 tracserver email2trac cloud: TimeoutError: Unable to get database connection within 0 seconds. (TracError: Database "/trac/projects/cloud/db/trac.db" not found.)
and in maillog:
Mar 3 22:51:59 tracserver sendmail[29643]: p246pxQL029643: from=root, size=1885, class=0, nrcpts=1, msgid=<201103040651.p246pxQL029643@tracserver.ca1.company.com>, relay=root@localhost Mar 3 22:51:59 tracserver sendmail[29644]: p246px3i029644: from=<root@tracserver.ca1.company.com>, size=2194, class=0, nrcpts=1, msgid=<201103040651.p246pxQL029643@tracserver.ca1.company.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Mar 3 22:51:59 tracserver sendmail[29643]: p246pxQL029643: to=cloud, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31885, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (p246px3i029644 Message accepted for delivery) Mar 3 22:51:59 tracserver sendmail[29645]: p246px3i029644: to=|"email2trac --project=cloud", ctladdr=<cloud@tracserver.ca1.company.com> (8/0), delay=00:00:00, xdelay=00:00:00, mailer=prog, pri=32435, dsn=5.3.0, stat=unknown mailer error 1 Mar 3 22:51:59 tracserver sendmail[29645]: p246px3i029644: p246px3i029645: DSN: unknown mailer error 1 Mar 3 22:51:59 tracserver sendmail[29645]: p246px3i029645: to=<root@tracserver.ca1.company.com>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=33459, dsn=2.0.0, stat=Sent
My sendmail /etc/aliases:
# MAIL2TRAC Aliases cloud: |"email2trac --project=cloud"
I'm using a symlink for email2trac
lrwxrwxrwx 1 root root 19 Mar 3 20:07 email2trac -> /usr/bin/email2trac
On RHEL5
The MTA_USER = mail ( tested with user script )
less /var/tmp/sendmail.id uid=8(mail) gid=12(mail) groups=12(mail)
TRAC_USER = apache
My email2trac.conf
[DEFAULT] #project: /data/trac/hpcv/project/test project: /trac/projects/cloud debug: 1 umask: 022 spam_level: 5 reply_all : 0 mailto_link: 0 umask: 022 email_header: 0 trac_version: 0.12 enable_syslog : 1 alternate_notify_template : alternate_notify_template_update : drop_spam : 0 verbatim_format: 1 strip_signature: 0 email_quote: > strip_quotes: 0 ignore_trac_user_settings: 0 black_list: MAILER-DAEMON@ drop_alternative_html_version: 1 [cloud] project: /trac/projects/cloud spam_level: 1 log_type: syslog log_level: debug ticket_update: 1 ticket_update_by_subject: 1 verbatim_format: 0
I don't know how it's trying to look for a sqlite db when the command line email2trac works just fine.
Let me know what else you need and i'll respond ASAP ! Thanks!
Attachments (0)
Change History (6)
comment:1 Changed 13 years ago by bas
comment:2 Changed 13 years ago by bas
- Status changed from new to assigned
- Type changed from defect to setup
comment:3 Changed 13 years ago by grendelson
I used easy_install for Trac install ( just reinstalled last night to 2.3dev) the TRAC_USER is apache (RHEL5 - all httpd runs as apache and all /trac/projects/* owned by apache I've been assuming it's permissions but I can't sort out where the problem is occurring or why it manifests in a failed lookup for a sqlite db ( it can't read the trac.ini to find the correct db?)
comment:4 Changed 13 years ago by grendelson (AT SYMBOL) gmail
Copied from above for easier reading
On RHEL5
The MTA_USER = mail ( tested with user script )
less /var/tmp/sendmail.id uid=8(mail) gid=12(mail) groups=12(mail)
TRAC_USER = apache
comment:5 Changed 13 years ago by grendelson
- Resolution set to worksforme
- Status changed from assigned to closed
I uninstalled the RPM I had built using the RPM suggested method on this site. I then downloaded and unpacked and ran an install as if I had NO package mgr.
Iused the following: ./configure --prefix=/x/opt/email2trac --with-mta_user=mail --with-trac_user=apache -enable-python
and the resulting files I linked /etc/smrsh and movedmy old email2trac.conf over to /x/opt/email2trac/etc/ and tested - it runs fine now! Both from cmd line AND from /etc/aliases where I have " cloud: |"run_email2trac --project=cloud" "
Thanks so much for the feedback it gave me something to test!
comment:6 Changed 13 years ago by bas
Your welcome and i am glad everything works as expected!
we use postgress and it is a permission problem. When you:
It runs as root user. So no problem here. Only when you use the mail program
How did you install trac? With configure/make install What is the TRAC_USER?