Fun with OpenEMM installation

A few days ago  a colleague asked me if I could install a Newsletter System for him on one of our servers. He decided to use OpenEMM 6.1.

OpenEMM is a feature-rich enterprise software for e-mail marketing, newsletters and service mails (transaction mails and event or time triggered mails). OpenEMM offers sophisticated bounce management, link tracking, lots of realtime statistics, a CMS module and a scripting feature to implement individual tasks…….  cool 🙂

Installation goes by hand, cause sadly there are no deps.

However – after a bit of googling I found a wiki which descriptives the installation process for the common linux distros.

As a brave installation instruction follower I went through the installation step by step.

In the end there was only one task left to start the application server resin and login in for the first time.

And the fun starts 🙂

Instead of a shiny login screen I got….

An error occurred

javax.servlet.ServletException:  org.springframework.jdbc.UncategorizedSQLException: Hibernate  operation: Cannot open connection; uncategorized SQLException for SQL  [???]; SQL state [null]; error code [0]; Cannot create  PoolableConnectionFactory (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.); nested  exception is org.apache.commons.dbcp.SQLNestedException: Cannot create  PoolableConnectionFactory (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.)

hmmm, so what is jdbc trying us to say?

So I checked the stack trace:

Caused by: Connection refused
 at Method)
 at com.mysql.jdbc.StandardSocketFactory.connect(
 at com.mysql.jdbc.MysqlIO.(
 ... 57 more

“Connection refused” what the hell…. ok, database credentials are ok, openemm and openemm_cms schema are created. The MySQL error log says nothing? I’m able to connect to the schemas via mysql client ……. oh mannn, it turned out that I’m not the only one with this problem, lol, but all forum posts I could find so far offered no solution for my problem.

Then after half a day more or less searching for a solution I found a post where someone is talking about to check the MySQL “bind-address” parameter.  Checking my.cnf  turns out that the address binding was set to the external address of the server, lol what…, who changed that???

Quickly changed the address-binding back to “localh0st” restarted OpenEMM and requested the logging screen. Unsurprisingly the HTML error stays the same but,…. the stack trace changed…yeahhhh.

Now the trace shows:

Caused by: Can not read response from server. Expected to read 4 bytes, read 0 bytes before connection was unexpectedly lost.
 at com.mysql.jdbc.MysqlIO.readFully(
 at com.mysql.jdbc.MysqlIO.readPacket(
 ... 72 more

Humpf,…… firing on google. I interpreted this message that jdbc could successfully establish a connection to the database and than for some reason the connection was closed from the db side.

A few hours later checking a lot posts concerning this problem I found a small side node in a post that it make sense to check the host.allow entrys.

Added ….

mysqld : localhost : allow

and ….. it works yeahhhhhh 🙂

4 thoughts on “Fun with OpenEMM installation”

  1. Thank you for your solution.

    I had to change the openemm configuration because i need the binding to the external ip instead of localhost.

    Go to file:

    and change the entry:

    to ( is you external ip)

    That works for me!

  2. Just wish to say your article is as amazing. The clearness
    in your post is just great and i can assume you’re an expert on this subject. Well with your permission allow me to grab your feed to keep updated with forthcoming post. Thanks a million and please keep up the gratifying work.

  3. Hallo Mario,

    Schoene Gruesse nach Kaernten, bin selber Kaertner aber im Ausland lebend. Very good solution as you described, however are you able to make a tuturial on how to set it upon a Server operationg System would be Centos 6X.
    I am in need to set this Software up on my Server as well,however it is to technical for me. Please let me know if you would be able to assist or reply to my E-Mail.
    Thanks and best regards,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.