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: java.net.ConnectException: Connection refused at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:529) at java.net.Socket.connect(Socket.java:478) at java.net.Socket.(Socket.java:375) at java.net.Socket.(Socket.java:218) at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256) at com.mysql.jdbc.MysqlIO.(MysqlIO.java:293) ... 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: java.io.EOFException: 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(MysqlIO.java:2497) at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:599) ... 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 🙂