Not logging to MySQL Since update

Hello,

I updated to 3.8.0 then to 3.8.1 Alpha because of an LDAP Issue. I am now unable to log anything to my Local MySQL DB. As of now I do not see any errors to troubleshoot from. Is anyone else seeing this issue?

Do you have logs in your openfire/logs directory? How exactly did it used to log to MySQL?

Do you have a copy of your log4j.xml file from 3.8.0 or 3.7.x that worked? Can you compare that to the one you are using today?

Connections were made to a local mysql -> openfire DB. Inside the DB there is a ofmessagearchive table where all message archives were saved and reported on.

None of the tables in that DB have been updated since the we upgraded Openfire.

Yes, there are the normal Error, warn, info logs in the logs directory.

I am seeing a ton of Java errors - my DB connection looks like this:

  • org.jivesoftware.database.DefaultConnectionProvider

  • com.mysql.jdbc.Driver

    jdbc:mysql://10.10.2.62:3306/openfire

    #######

    ##########

    select 1

    true

    true

    5

    100

    1.0

    true

  • true

Here is an entry from my info log:

2013.02.11 08:50:32 org.jivesoftware.database.DbConnectionManager - Unable to get a connection from the database pool (attempt 2 out of 10).

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

** BEGIN NESTED EXCEPTION **

java.net.ConnectException

MESSAGE: Connection refused: connect

STACKTRACE:

java.net.ConnectException: Connection refused: 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.ConnectionPool.getConnection(ConnectionPool.java:211 )

at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnec tionProvider.java:86)

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)

at org.jivesoftware.openfire.reporting.stats.RrdSqlBackend.exists(RrdSqlBackend.ja va:211)

at org.jivesoftware.openfire.reporting.stats.RrdSqlBackendFactory.exists(RrdSqlBac kendFactory.java:43)

at org.jrobin.core.RrdDb.(Unknown Source)

at org.jrobin.core.RrdDb.(Unknown Source)

at org.jivesoftware.openfire.reporting.stats.StatsEngine$SampleTask.run(StatsEngin e.java:362)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

** 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.ConnectionPool.getConnection(ConnectionPool.java:211 )

at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:89)

at java.sql.DriverManager.getConnection(Unknown Source)

at java.sql.DriverManager.getConnection(Unknown Source)

at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnec tionProvider.java:86)

at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)

at org.jivesoftware.openfire.reporting.stats.RrdSqlBackend.exists(RrdSqlBackend.ja va:211)

at org.jivesoftware.openfire.reporting.stats.RrdSqlBackendFactory.exists(RrdSqlBac kendFactory.java:43)

at org.jrobin.core.RrdDb.(Unknown Source)

at org.jrobin.core.RrdDb.(Unknown Source)

at org.jivesoftware.openfire.reporting.stats.StatsEngine$SampleTask.run(StatsEngin e.java:362)

at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)

at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)

at java.util.concurrent.FutureTask.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

can you connect to the mysql server from the openfire server from the command line? Any logs on the MySQL end?

Sounds like either a firewall issue, or MySQL is not running/listening on the right IPs.

Yes, I can connect using the command line locally and from a remote machine (using the same user).

MySQL error logs are not showing any issues.

While troubleshooting I noticed that the openfire admin console states that

Java Version:
1.6.0_18

While from the command line:

C:\tmp>java -version

java version “1.7.0_13”

Java™ SE Runtime Environment (build 1.7.0_13-b20)

Java HotSpot™ Client VM (build 23.7-b01, mixed mode, sharing)

Any other places I can troubleshoot this?

Disregard, found table corruptions. Once corrected the ofmessagearchive table began populating.

Thank you,