MySQL firewall issues

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

murmur
Posts: 1
Joined: 02 Apr 2011, 08:07

MySQL firewall issues

Postby murmur » 02 Apr 2011, 08:13

I am running into issues where it seems a firewall (ufw on Ubuntu) is blocking com.mysql.jdbc from communicating with MySQL. (MySQL and smartfox sfs2x are both on same server)

If the firewall if off all is well, but if it is on I get the following errors on server statup

Code: Select all

Exception: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException
Message: 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.
Description: The DBManager Test SQL failed
Please double check your SQL code and make sure that Database server is running.


for the life of me, though, I cannot work out what port/s may be blocking this communication..

any help/suggestions greatly appreciated.
User avatar
Bax
Site Admin
Posts: 4612
Joined: 29 Mar 2005, 09:50
Location: Italy
Contact:

Postby Bax » 02 Apr 2011, 16:24

By default MySQL uses port 3306.
Paolo Bax
The SmartFoxServer Team
Democre
Posts: 77
Joined: 16 Sep 2010, 17:58

Postby Democre » 02 Apr 2011, 16:45

Murmur,
We were getting that error at one point. For us it was unrelated to firewall issues though. We were using prepared statements and not closing the statements properly. It didn't happen everytime, more usually the first time a connection was used after restart. Our theory was that somehow the connection was not being returned to the pool or closed out properly, hence the "no packet received" message.
We have not had the problem since we went through and ensured that all prepared statements (and connections) were closed.
May not be your issue, but the error message was the same. We never disabled our firewall (Ubuntu on EC2 instance)

-Andy

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Stevenor and 106 guests