"Database Setting" errors when installing Openfire on MySQL

I am new to Openfire and would greatly appreciate installation help. I am installing MySQL onto a MySQL run database from a Windows machine. Each time that I try to connect to the server I receive an error along the lines of this:

CommunicationsException: Communications link failure due to underlying exception:

I have already done the following:

  • prepared the server by making a database and formatting it properly

  • windows firewall automatically blocked openfire, but I told the firewall to allow Openfire to pass any data to the server

  • i created a seperate user with access to the openfire db

I understand that there may be an issue with the 127.0.0.1 connection settings, but if I enter 127.0.0.1 in where the [host-name] goes, the computer can’t even find the site, and for good reason. Any ideas?

Oh, this may help:


2009.01.15 17:25:50 [org.jivesoftware.util.log.util.CommonsLogFactory$1.error(CommonsLogFactory.jav a:92)
] Prototype
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.ConnectException
MESSAGE: Connection timed out: connect

STACKTRACE:

java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
at com.mysql.jdbc.MysqlIO.(MysqlIO.java:271)
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
at com.mysql.jdbc.Connection.(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn ectionBuilder.java:39)
at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)
at org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:102)
at org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java:44)

** END NESTED EXCEPTION **

Last packet sent to the server was 0 ms ago.
at com.mysql.jdbc.Connection.createNewIO(Connection.java:2847)
at com.mysql.jdbc.Connection.(Connection.java:1555)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConn ectionBuilder.java:39)
at org.logicalcobwebs.proxool.Prototyper.buildConnection(Prototyper.java:159)
at org.logicalcobwebs.proxool.Prototyper.sweep(Prototyper.java:102)
at org.logicalcobwebs.proxool.PrototyperThread.run(PrototyperThread.java:44)


Thanks, very very much.

If openfire is on the same server as mysql you need only enter the name localhost for the name of the server. Windows sometimes does not like using the loopback address 127.0.0.1.

For example the connection string could be: jdbc:mysql://localhost:3306/openfire

If it is on a different server than openfire then you need to enter the real address of the server instead of localhost. You also need to make sure the database allows for external connections.

Thank you for the quick help.

I am running openfire through a different server. As you suggested, I checked my server settings and added my computer’s name to the remote database access list. I however am still being rejected. Should the site address be formatted to include “www.”? Should the address after the colon be 3306? Thanks again.

Does your MySQL account set username@localhost or username@% (anyhost)?

The port unless you changed it should be 3306. You need to make sure that the catalog you created for openfire also allows access from the openfire server. the information after the / in my sample string is the name of the mysql catalog you created for openfire.

Thank you all for the help. The problem is solved. The final issue was pointed out by Todd, my IP address was not allowed access through my Remote Database’s Firewall. I use hostmonster, so if there is anyone else that has my problems, here is how it was solved:

[host-name] = domain.com

[database-name] = dom_db hostmonster often abreviates the domain for your primary login and uses that as a prefix for the databases

username = dom_userame

Allow the user that is logging in access to the openfire db. For Hostmonster use MySQL Database

Allow your IP address access through the firewall. For Hostmonster use Remote MySQL

If anyone new is wondering, for Windows the error log is located here: file:///C:/Program%20Files/Openfire/logs and is called error.log (but it’s a text file).

I hope that saves somebody a few hours.