Disable Sendmail doesn't work

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

philip
Posts: 11
Joined: Tue Jun 24, 2008 1:27 pm

Disable Sendmail doesn't work

Post by philip »

Hi,

I'm using OpenEMM 5.5.0 and trying to disable sendmail. I get following error:

Code: Select all

CAUGHT EXCEPTION:
Traceback (most recent call last):
  File "/home/openemm/bin/scripts/smenable.py", line 105, in ?
    main (sys.argv[0], sys.argv[1:])
  File "/home/openemm/bin/scripts/smenable.py", line 87, in main
    ctrl = SMCtrl ()
  File "/home/openemm/bin/scripts/smenable.py", line 35, in __init__
    self.db = agn.DBase ()
AttributeError: 'module' object has no attribute 'DBase'
Similar error occurres when starting openEMM.
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

python-mysql module missing?

Post by maschoff »

It seems that the python-mysql bridge is missing. please check with

#python -c 'import MySQLdb'

If no output is returned the module is present, but if you get something like

Traceback (most recent call last):
File "<string>", line 1, in ?
ImportError: No module named MySQLdb

you did not install the module
OpenEMM Maintainer
philip
Posts: 11
Joined: Tue Jun 24, 2008 1:27 pm

Post by philip »

Thanks, that solved the problem in the first time..

but now I get the following message:

"Failed to setup database interface"

Everything else works fine, except of sending mails as sendmail is still enabled.

I'm using Debian 3.1 with exim MTA..
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Is MySQL up and running and did you dump openemm.sql into database "openemm"?
OpenEMM Maintainer
philip
Posts: 11
Joined: Tue Jun 24, 2008 1:27 pm

Post by philip »

Yes, mySQL is running and openemm.sql is imported.

I'm using MySQL version 5.0.51

openEMM is starting like this:

Code: Select all

Start /home/openemm/bin/scripts/bav-update.py .. done.
Start /home/openemm/bin/scripts/bav-trigger.py .. done.
Start /home/openemm/bin/scripts/bavd.py .. done.
Start /home/openemm/bin/bav -L INFO .. done.
Start /home/openemm/bin/scripts/update.py bounce account .. done.
Start /home/openemm/bin/scripts/pickdist.py .. done.
Failed to setup database interface
Unable to determinate status for sendmail usages, assuming sendmail is enabled
Stopping obsolete sendmail processes:   done.
Starting sendmails:   listener  admin queue exim abandoned: unknown, malformed, or incomplete option -NNEVER
 mail queue exim abandoned: unknown, malformed, or incomplete option -NNEVER
 done.
Start /home/openemm/bin/scripts/slrtscn.py .. done.
Resin httpd start at Wed Jun 25 13:04:04 UTC 2008
Now I can login and work with openEMM but no mails are sent.

Thanks for Your support!
bknaus
Posts: 3
Joined: Mon Dec 31, 2007 11:38 am
Location: Wiesbaden
Contact:

I have the same problem

Post by bknaus »

I have the same problem. OpenEMM 5.5.0 (Gentoo).

Code: Select all

$ ./bin/OpenEMM.sh start
Start /home/openemm/bin/scripts/bav-update.py .. done.
Start /home/openemm/bin/scripts/bav-trigger.py .. done.
Start /home/openemm/bin/scripts/bavd.py .. done.
Start /home/openemm/bin/bav -L INFO .. done.
Start /home/openemm/bin/scripts/update.py bounce account .. done.
Start /home/openemm/bin/scripts/pickdist.py .. done.
Failed to setup database interface
Unable to determinate status for sendmail usages, assuming sendmail is enabled
Stopping obsolete sendmail processes:   done.
Starting sendmails:   listener  admin queue  mail queue  done.
Start /home/openemm/bin/scripts/slrtscn.py .. done.
openemm@java-tools-mwonline ~ $ Resin httpd start at Mon Jun 30 16:47:00 CEST 2008
Backend works fine, admin and test mails will be send, but sending mails to newsletter recipient doesn't work.
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

missing package?

Post by maschoff »

The Python interface to MySQL seems to be missing. Are you sure that you installed the python-mysql package (SuSe name: python-mysql, Red Hat name: MySQL-python)?
OpenEMM Maintainer
kwadrat
Posts: 12
Joined: Mon Jul 21, 2008 11:39 am

Post by kwadrat »

@philip, @bknaus:
I've got the same, have you solved this problem?
running OpenEMM 5.5.0 on Fedora Core 5
philip
Posts: 11
Joined: Tue Jun 24, 2008 1:27 pm

Post by philip »

No, sorry. I switched to Windows machines so I didn't investigate further on.

Have you tried different versions of Java?

Good luck an please report any success.
Toot
Posts: 17
Joined: Fri Jun 29, 2007 4:59 pm
Location: UK

me too, no solution yet?

Post by Toot »

I'm trying to migrate from a sendmail v5.4.0 linux to v5.5.0 linux with sendmail disabled (it's a mail server using postfix).

I'm installing without sendmail which originally pooped out at the openemm rpm install saying sendmail-cf dependency couldn't be found. I --nodeps installed that, copied & upgraded the database successfully (apart from my new db has a password, old one didn't). Installed v5.5.0 apparently successfully, starting gives several errors:

Code: Select all

Start /home/openemm/bin/scripts/bav-update.py .. done.
Start /home/openemm/bin/scripts/bav-trigger.py .. done.
Start /home/openemm/bin/scripts/bavd.py .. done.
Start /home/openemm/bin/bav -L INFO .. done.
Start /home/openemm/bin/scripts/update.py bounce account .. done.
Start /home/openemm/bin/scripts/pickdist.py .. done.
Failed to setup database interface
Unable to determinate status for sendmail usages, assuming sendmail is enabled
Stopping obsolete sendmail processes:   done.
Starting sendmails:   listener  admin queue  mail queue  done.
postfix/postfix-script: fatal: the Postfix mail system is already running
Start /home/openemm/bin/scripts/slrtscn.py .. done.
$ Resin httpd start at Thu Aug  7 18:15:14 BST 2008
and running ~/bin/sendmail-disable.sh says:

Code: Select all

Failed to setup database interface
and in case it's relevant, as I didn't re-install mysql...

Code: Select all

mysql  Ver 14.7 Distrib 4.1.20, for redhat-linux-gnu (i686) using readline 4.3
what's wrong?!?!
ud
Posts: 154
Joined: Thu Aug 17, 2006 9:56 am
Location: Munich, Germany
Contact:

Post by ud »

Looks like your mysql is not running (as you upgrade from a previous version, I assume that the database itself is available.)

-- ud
Toot
Posts: 17
Joined: Fri Jun 29, 2007 4:59 pm
Location: UK

Post by Toot »

ud wrote:Looks like your mysql is not running (as you upgrade from a previous version, I assume that the database itself is available.)

-- ud
Thanks for the reply. As far as I can tell, mysql is running fine:

Code: Select all

mysql> select count(*) from customer_1_tbl;
+----------+
| count(*) |
+----------+
|      664 |
+----------+
1 row in set (0.01 sec)
Maybe it's because this instance has a password? On the old system, I'd type mysql openemm and I'm in, on the new system I need to type mysql -p openemm and enter the password. Where is that set?

Thanks again for your help.
sapeksh
Posts: 9
Joined: Wed Nov 19, 2008 7:14 am

Resolved: Need to update user name and pwd in scripts/agn.py

Post by sapeksh »

I was facing the same issue after migrating OpenEMM to a new server. This time while creating the DB user 'agnitas' I chose a password other than openemm (default).

File: /home/openemm/bin/scripts/agn.py has variables where you can update the value of the DB Host, User and Password. Changed this and triedsendmail-enable.sh and it worked.

If this still does not work, make sure that there is DB connectivity using the default values Host: localhost, User : agnitas and pwd : openemm.

Though it is too late since the last response on this post to help him, however posting it for new users like me.
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

For clarity we will move the parameters out of agn.py to emm.properties in the next release.
OpenEMM Maintainer
horhe2
Posts: 5
Joined: Thu Nov 26, 2009 4:18 pm

Post by horhe2 »

I've similar problem after autoupgrading from 5.5.1 .
./smenable displays message:
"Failed to setup database interface"
In files cms/properties and emm.properties connection to DB are set.
I have no idea how to debug the problem.
Post Reply