[RESOLVED] Problem using remote mysql server

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

Moderator: moderator

vdu
Posts: 5
Joined: Tue Oct 16, 2012 10:31 am

[RESOLVED] Problem using remote mysql server

Post 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...
Last edited by vdu on Tue Nov 06, 2012 3:44 pm, edited 1 time in total.
maschoff
Site Admin
Posts: 2602
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem using remote mysql server

Post by maschoff »

You may have to adjust the ecs property in file emm.properties.
OpenEMM Maintainer
vdu
Posts: 5
Joined: Tue Oct 16, 2012 10:31 am

Re: Problem using remote mysql server

Post 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.
maschoff
Site Admin
Posts: 2602
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: Problem using remote mysql server

Post 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?
OpenEMM Maintainer
vdu
Posts: 5
Joined: Tue Oct 16, 2012 10:31 am

Re: Problem using remote mysql server

Post 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.
Post Reply