Neuinstallation von Openfire + MySQL: Fehler "Network is unreachable"

Hello,

after an Debian-Upgrade to “testing” I got an error in my Openfire configuration: There was some weird error connecting to the MySQL-Server.

Therefore I tried a complete reinstallation with “apt-get purge” and “dpkg -i”, bu I have trouble adding my mysql-config:

A connection to the database could not be made. View the error message by opening the “/logs/error.log” log file, then go back to fix the problem.

My Setup:

  • mysqld Ver 5.1.44-3 for debian-linux-gnu on i486 ((Debian))
    • listening on “remote” IP 192.168.64.15
    • user openfire open for connection from all hosts (for testing)
    • user root open for connection from all hosts (for testing)
    • connecting to database openfire possible from local and remote with both users
  • java version “1.6.0_16” - Java™ SE Runtime Environment (build 1.6.0_16-b01) - Java HotSpot™ Client VM (build 14.2-b01, mixed mode, sharing)
  • openfire 3.6.4 (deb)

When starting tzhe setup the error.log will fill with:

2010.03.26 01:16:57 [org.jivesoftware.util.log.util.CommonsLogFactory$1.error(CommonsLogFactory.java:92)] Prototype
com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception: ** BEGIN NESTED EXCEPTION ** java.net.SocketException
MESSAGE: Network is unreachable STACKTRACE: java.net.SocketException: Network is unreachable
        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:525)
        at java.net.Socket.connect(Socket.java:475)
        at java.net.Socket.<init>(Socket.java:372)
        at java.net.Socket.<init>(Socket.java:215)
        at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:256)
        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:271)
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2771)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.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 2 ms ago.
        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2847)
        at com.mysql.jdbc.Connection.<init>(Connection.java:1555)
        at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:285)
        at java.sql.DriverManager.getConnection(DriverManager.java:582)
        at java.sql.DriverManager.getConnection(DriverManager.java:154)
        at org.logicalcobwebs.proxool.DefaultConnectionBuilder.buildConnection(DefaultConnectionBuilder.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)
[...]

I tried the following Database-URLs:

  • jdbc:mysql://192.168.64.15:3306/openfire
  • jdbc:mysql://127.0.0.1:3306/openfire
  • jdbc:mysql://localhost:3306/openfire
  • jdbc:mysql://server:3306/openfire
  • jdbc:mysql://server.FQDN:3306/openfire
    • jdbc:mysql://<some_invalid_ip>:3306/openfire

unfortunatly I will get this error regardless of the URL used.

Can anyone give me a hint in the right direction?

Thank you in advance.

Tobias

Hi Tobias,

try “netstat -an|grep 3306” and make sure that the port is open. Does “telnet 127.0.0.1 3306” work (here you should get a connection, terminate it with Ctrl+?

If this is fine then you can try to edit your openfire.xml file and change “true” to “false” and run the setup again, there you can specify a new database connection URL.

LG

Hello LG,

telnetting the mysql-Server works fine, I can access it even from a remote computer and log in with the supplied credentials.

I completely deleted the /etc/openfire/ directory while purgin openfire and at the moment, I can not set up openfire due to the given error message.

I get this error while adding the mysql database to the configuration.

Tobias

Hi Tobias,

is it possible that you hit http://bugs.debian.org/560056 ?

LG

Hello LG,

yes, fixing this Bug and switching MySQL back to bind to 127.0.0.1 fixed the problems. We are up and running again!

Thanks!