Disable Sendmail doesn't work

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

Moderator: moderator

maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

In which situation do you get this error message?

What are your settings in emm.properties for

mailgun.ini.db_login
mailgun.ini.db_password
mailgun.ini.sql_connect

?
OpenEMM Maintainer
horhe2
Posts: 5
Joined: Thu Nov 26, 2009 4:18 pm

Post by horhe2 »

Thanks for response, i hope i didn't stole thread.
Settings from emm.properties:
mailgun.ini.db_login=::jdbc.username
mailgun.ini.db_password=::jdbc.password
mailgun.ini.sql_connect=::jdbc.url

This error happens while i'm trying to start openemm:

Code: Select all

openemm@mailer ~/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.
[b]Failed to setup database interface[/b]
Unable to determinate status for sendmail usages, assuming sendmail is enabled
Stopping obsolete sendmail processes:   done.
Starting sendmails:   listener  client queue clientmqueue  admin queue  mail queue  done.
Start /home/openemm/bin/scripts/slrtscn.py .. done.
I found that those message is generated from:

Code: Select all

 ~/bin $ scripts/smenable.py status
Failed to setup database interface
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

The settings mean that smenable takes the properties of jdbc.username, jdbc.password and jdbc.url. Are you sure that those properties (at the beginning of file emm.properties) are set correctly?
OpenEMM Maintainer
horhe2
Posts: 5
Joined: Thu Nov 26, 2009 4:18 pm

Post by horhe2 »

It looks like this:
jdbc.url=jdbc:mysql://server-mysql/openemm?useUnicode=yes&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
jdbc.dialect=org.hibernate.dialect.MySQLDialect
jdbc.username=openemmuser
jdbc.password=xxxxxxxxxxx

Connection to database probably is correct, i can use panel, i can see campaign, recipients etc.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

I see, your database runs on a different server. Maybe that's the problem.
OpenEMM Maintainer
horhe2
Posts: 5
Joined: Thu Nov 26, 2009 4:18 pm

Post by horhe2 »

Yes, you are right.
I made workaround for a bug. Problem is in agn.py , lines 247-248. agn.py doesn't read config files, after change defaults in those line to needed to connect to database (host: server-mysql, etc) problem disappear.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Could it be that you do not use OpenEMM 6.0?
OpenEMM Maintainer
horhe2
Posts: 5
Joined: Thu Nov 26, 2009 4:18 pm

Post by horhe2 »

No, after auto-update was done, i checked files against tarball from your page.
from agn.py:
changelog = [
[snip]
<------>('2.2.0', '2009-05-06', 'Moved configuration to emm.properties', 'ud@agnitas.de'),
<------>('2.2.1', '2009-05-18', 'Added @deprecated decorator', 'ud@agnitas.de'),
<------>('2.2.3', '2009-07-28', 'validate: Added support for keyword reason', 'ud@agnitas.de'),

<------>('2.2.4', '2009-10-26', 'Read database paramter for CMS', 'ud@agnitas.de'),

It looks like file from newer version than e.g. 5.5.1 .
sp
Posts: 21
Joined: Mon Apr 12, 2010 2:04 pm

Post by sp »

There is a bug in agn.py and its Properties class. The defaults at line 247 will always be taken, no matter what.
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Patch

Post by maschoff »

--- agn.py-6.0.1 2010-05-11 11:16:20.000000000 +0200
+++ agn.py 2010-05-11 11:16:39.000000000 +0200
@@ -251,7 +251,7 @@
url = self[keyUrl]
usr = self[keyUsername]
pwd = self[keyPassword]
- m = re.search (url, '[^/]+://([^/]+)/(.*)$')
+ m = re.search ('[^/]+://([^/]+)/(.*)$', url)
if not m is None:
(hst, dbn) = m.groups ()
else:
OpenEMM Maintainer
ismf
Posts: 5
Joined: Mon Oct 25, 2010 5:48 pm

Same problem..

Post by ismf »

I have the same problem, was this bug already fixed??

Thank
maschoff
Site Admin
Posts: 2608
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Post by maschoff »

Yes, fixed with release 6.1
OpenEMM Maintainer
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Disable Sendmail doesn't work

Post by unhuman »

happening for me in 2011...

./smenable displays message:
"Failed to setup database interface"
unhuman
Posts: 46
Joined: Mon Jan 23, 2012 10:29 pm

Re: Disable Sendmail doesn't work

Post by unhuman »

So, I identified my problem here...

I was using xampp for my database stack. It conflicted with the default mysql configuration assumed by the system.

And, I got it working.

To debug this I linked /etc/my.cnf to the one in xampp
I also had to link /var/lib/mysql/mysql.sock to the specified by xampp.

Oddly, this only affected the scripts portion of OpenEMM, but the Java side worked fine.

More logging around exceptions in the scripts would be nice... :)
Infomess
Posts: 3
Joined: Mon Oct 08, 2012 2:05 pm

Re: Disable Sendmail doesn't work

Post by Infomess »

I'm in the same situation here.

I can login and use the CMS but I get the
Failed to setup database interface.

I am using a separate instance for the DB though, it is running on Amazon RDS.

I can connect to the DB using the command line and agnitas user has the proper permissions...

I have also updated the agn.py to point to the RDS endpoint but no luck...

Any pointers from anyone who managed to solve this problem would be appreciated!...

Thanks
Post Reply