Page 2 of 3

Posted: Thu Nov 26, 2009 4:53 pm
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

?

Posted: Fri Nov 27, 2009 10:50 am
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

Posted: Fri Nov 27, 2009 11:57 am
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?

Posted: Fri Nov 27, 2009 12:02 pm
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.

Posted: Fri Nov 27, 2009 12:18 pm
by maschoff
I see, your database runs on a different server. Maybe that's the problem.

Posted: Fri Nov 27, 2009 1:22 pm
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.

Posted: Tue Dec 01, 2009 2:33 pm
by maschoff
Could it be that you do not use OpenEMM 6.0?

Posted: Tue Dec 01, 2009 2:51 pm
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 .

Posted: Mon May 03, 2010 10:55 am
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.

Patch

Posted: Tue May 11, 2010 11:04 am
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:

Same problem..

Posted: Fri Oct 29, 2010 6:51 pm
by ismf
I have the same problem, was this bug already fixed??

Thank

Posted: Fri Oct 29, 2010 9:21 pm
by maschoff
Yes, fixed with release 6.1

Re: Disable Sendmail doesn't work

Posted: Tue Jan 31, 2012 12:56 am
by unhuman
happening for me in 2011...

./smenable displays message:
"Failed to setup database interface"

Re: Disable Sendmail doesn't work

Posted: Tue Jan 31, 2012 5:41 pm
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... :)

Re: Disable Sendmail doesn't work

Posted: Mon Oct 08, 2012 3:30 pm
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