Openfire startup problem

We’ve been using Openfire V3.5.1 without problems for months, but today suddenly it stopped and won’t start anymore. These are what I got from error.log;

Somebody help us please…

2008.12.17 16:59:58 [org.jivesoftware.database.EmbeddedConnectionProvider.getConnection(EmbeddedCon nectionProvider.java:57)
] EmbeddedConnectionProvider: Error while getting connection:
java.sql.SQLException: Out of Memory
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
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.EmbeddedConnectionProvider.getConnection(EmbeddedConn ectionProvider.java:54)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:101)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:729)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:459)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:161)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:106)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)
2008.12.17 17:00:17 [org.jivesoftware.database.EmbeddedConnectionProvider.getConnection(EmbeddedCon nectionProvider.java:57)
] EmbeddedConnectionProvider: Error while getting connection:
java.sql.SQLException: Out of Memory
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
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.EmbeddedConnectionProvider.getConnection(EmbeddedConn ectionProvider.java:54)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:101)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:729)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:459)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:161)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:106)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:51)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.exe4j.runtime.WinLauncher.main(Unknown Source)

That error looks to me like you have an issue with your database. You could try to run the config of your system again. This is done by modifying the tag of the openfire.xml to be false. This must be done with openfire server not running. If that does not work I am not sure where to direct you. I would say though that moving to an external database (mysql, mssql, etc) would help guard against this in the future as there are many means of backup and recovery for those types of databases.

Hi,

increase the Xmx value of Openfire and make sure that you have enough space in the file system. How to increase the Xmx value is described in the documentation and was discussed a lot of time here.

Are you using *nix or Windows?

LG

Thanks for your replies.

I tried reconfiguring by changing the setup tag to false but I got “Unable to connect to database” on the database setup part on the console.

I’m using a virtual machine with Windows and 2GB RAM. I also tried upping the Java heap size but I got the same database connection problem.

I suspect that it is due to a corrupted db files on the embedded.

Anyway, I just used an external Oracle database now and our IM service is now operational again. I just instructed the users to rebuild their contacts which is okay with them.

Thank you guys, we’re okay now.

Hi,

for you it may be less interesting, but other users which have a similar problem may want to take a look with vi at “embedded-db/openfire.script” and “embedded-db/openfire.log”. The embedded database stores simple DELETE and INSTERT statements within text files, so one can usually use these files to import the data into another database.

OutOfMemory errors do ususally not occur when a file is corrupt, so increasing the Xmx value should have solved the problem.

I imagine that you did use the Monitoring Plugin and thus your database did grow very fas. As all HSQLB tables are held in memory your memory usage may have grown also fast.

LG