Page 1 of 1

[RESOLVED] Problem using remote mysql server

Posted: Tue Oct 16, 2012 1:43 pm
by vdu
Hi,

I just installed openemm 2011 with a remote mysql server. To do this I changed the following parameters :

Code: Select all

~/WEB-INF/classes/emm.properties:jdbc.url=jdbc:mysql://auchan-sql02o.vmut93.cvf/openemm?useUnicode=yes&characterEncoding=UTF-8&useOldAliasMetadataBehavior=true
~/WEB-INF/classes/cms.properties:cmsdb.url=jdbc:mysql://auchan-sql02o.vmut93.cvf/openemm_cms?useUnicode=true&characterEncoding=UTF8&jdbcCompliantTruncation=false
All works fine except when I click on the Heatmap button, in the mailing statistics, where i get this error :

Code: Select all

An error occurred
Cause:	org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
It seems OpenEMM tries to connect to a local mysql server as it works when I make an ssh tunnel towards my sql server on port 3306

Is there another configuration file I missed to specify my sql server ? I searched within this forum with no luck.

Thanks for your help...

Re: Problem using remote mysql server

Posted: Wed Oct 17, 2012 9:43 am
by maschoff
You may have to adjust the ecs property in file emm.properties.

Re: Problem using remote mysql server

Posted: Wed Oct 17, 2012 1:07 pm
by vdu
Hi,

Thank you fro replying, maschoff. Are you talking about the "ecs.server.url" property? Right now, it looks like :

Code: Select all

ecs.server.url=http://openemm.mydomain.com
What should I replace this with ? Anyway, I'm not convinced it is the solution, because the problem seems to be mysql related. With tcpdump, I see OpenEMM trying to connect on localhost:3306 instead of the mysql server I defined both in emm.properties and cms.properties.

Re: Problem using remote mysql server

Posted: Thu Oct 18, 2012 7:44 am
by maschoff
The database connection for ECS is defined as JNDI resource in Tomcat configuration file context.xml. Did you change property url of tag resource there?

Re: Problem using remote mysql server

Posted: Thu Oct 18, 2012 8:48 am
by vdu
Hello,

After changing context.xml, the mysql database connection is now working.

Now I have another issue, but I'll open a new thread...

Thanks a lot for your help.