powered by Jive Software

Migrating Openfire 3.7.1 from Windows to Linux

I have a working installation of Openfire 3.7.1(embedded-db) on Windows XP, i want to move this Linux (Debian).

I have followed this thread http://community.igniterealtime.org/thread/33347

Step 1. Install Openfire from deb

Step 2. Shutdown Openfire on Windows and copy the embedded-db folder

Step 3. Place it in the relevant directory in Debian (/usr/shar/openfire/embedded-db is a symlink to /var/lib/openfire/embedded-db, so I replaced it in the latter. Another thing i noticed was that the embedded-db folder from Windows had a file named openfire.script which the linux version didn’t)

Step 4. Access IP:9090 and run setup

When i run setup from IP:9090 i get the following error at the “Admin User” step

There was an unexpected error encountered when setting the new admin information. Please check your error logs and try to remedy the problem.

The contents of the error.log file are as follows:

2012.08.06 17:51:08 org.jivesoftware.util.log.util.CommonsLogFactory - Prototype

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@5ef5a813[file =/var/lib/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /var/lib/openfire/embedded-db/openfire.lck (Permission denied)

      at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

      at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)

      at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

      at org.hsqldb.jdbcDriver.connect(Unknown Source)

      at java.sql.DriverManager.getConnection(DriverManager.java:582)

      at java.sql.DriverManager.getConnection(DriverManager.java:154)

      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)

2012.08.06 17:51:08 org.jivesoftware.database.DbConnectionManager - The database is already in use by another process: org.hsqldb.persist.NIOLockFile@5ef5a813[file =/var/lib/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /var/lib/openfire/embedded-db/openfire.lck (Permission denied)

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@5ef5a813[file =/var/lib/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /var/lib/openfire/embedded-db/openfire.lck (Permission denied)

      at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

      at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)

      at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

      at org.hsqldb.jdbcDriver.connect(Unknown Source)

      at java.sql.DriverManager.getConnection(DriverManager.java:582)

      at java.sql.DriverManager.getConnection(DriverManager.java:154)

      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(DriverManager.java:582)

      at java.sql.DriverManager.getConnection(DriverManager.java:154)

      at org.jivesoftware.database.EmbeddedConnectionProvider.getConnection(EmbeddedConn ectionProvider.java:61)

      at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectio nManager.java:620)

      at org.jivesoftware.openfire.admin.setup.setup_002ddatasource_002dsettings_jsp._js pService(setup_002ddatasource_002dsettings_jsp.java:155)

      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

      at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

      at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)

      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1216)

      at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:11 8)

      at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)

      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

      at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)

      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

      at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)

      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

      at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)

      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

      at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)

      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:425)

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494)

      at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:182)

      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:93 3)

      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:362)

      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867 )

      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:245)

      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:126)

      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)

      at org.eclipse.jetty.server.Server.handle(Server.java:334)

      at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559)

      at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConne ction.java:992)

      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:541)

      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:203)

      at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406)

      at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:4 62)

      at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)

      at java.lang.Thread.run(Thread.java:662)

2012.08.06 17:51:37 org.jivesoftware.util.log.util.CommonsLogFactory - Prototype

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@5ef5a813[file =/var/lib/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /var/lib/openfire/embedded-db/openfire.lck (Permission denied)

      at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

      at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)

      at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

      at org.hsqldb.jdbcDriver.connect(Unknown Source)

      at java.sql.DriverManager.getConnection(DriverManager.java:582)

      at java.sql.DriverManager.getConnection(DriverManager.java:154)

      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)

2012.08.06 17:52:07 org.jivesoftware.util.log.util.CommonsLogFactory - Prototype

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@5ef5a813[file =/var/lib/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /var/lib/openfire/embedded-db/openfire.lck (Permission denied)

      at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

      at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)

      at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

      at org.hsqldb.jdbcDriver.connect(Unknown Source)

      at java.sql.DriverManager.getConnection(DriverManager.java:582)

      at java.sql.DriverManager.getConnection(DriverManager.java:154)

      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)

2012.08.06 17:52:37 org.jivesoftware.util.log.util.CommonsLogFactory - Prototype

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@5ef5a813[file =/var/lib/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /var/lib/openfire/embedded-db/openfire.lck (Permission denied)

      at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

      at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)

      at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

      at org.hsqldb.jdbcDriver.connect(Unknown Source)

      at java.sql.DriverManager.getConnection(DriverManager.java:582)

      at java.sql.DriverManager.getConnection(DriverManager.java:154)

      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)

2012.08.06 17:53:07 org.jivesoftware.util.log.util.CommonsLogFactory - Prototype

java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@5ef5a813[file =/var/lib/openfire/embedded-db/openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: /var/lib/openfire/embedded-db/openfire.lck (Permission denied)

      at org.hsqldb.jdbc.Util.sqlException(Unknown Source)

      at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)

      at org.hsqldb.jdbcDriver.getConnection(Unknown Source)

      at org.hsqldb.jdbcDriver.connect(Unknown Source)

      at java.sql.DriverManager.getConnection(DriverManager.java:582)

      at java.sql.DriverManager.getConnection(DriverManager.java:154)

      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)

If i choose to skip the “Admin User” and login using user id/password as admin/admin i get the following error:

Exception:

java.lang.NoClassDefFoundError: Could not initialize class org.jivesoftware.admin.LoginLimitManager$LoginLimitManagerContainer

at org.jivesoftware.admin.LoginLimitManager.getInstance(LoginLimitManager.java:48)

at org.jivesoftware.openfire.admin.login_jsp._jspService(login_jsp.java:143)

at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:530)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1216)

at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:39)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.util.LocaleFilter.doFilter(LocaleFilter.java:74)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingF ilter.java:50)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.admin.PluginFilter.doFilter(PluginFilter.java:78)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.jivesoftware.admin.AuthCheckFilter.doFilter(AuthCheckFilter.java:164)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.ja va:1187)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:425)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:494)

at org.eclipse.jetty.server.session.SessionHandler.handle(SessionHandler.java:182)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:93 3)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:362)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:867 )

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandler Collection.java:245)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.jav a:126)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:113)

at org.eclipse.jetty.server.Server.handle(Server.java:334)

at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:559)

at org.eclipse.jetty.server.HttpConnection$RequestHandler.content(HttpConnection.j ava:1007)

at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:747)

at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:209)

at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:406)

at org.eclipse.jetty.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:4 62)

at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:436)

at java.lang.Thread.run(Thread.java:662)

Is is possible to move user information from windows to linux when an embedded database is being used?

Looks like a file permissions/ownership problem. Is your embedded-db directory owned by the daemon user (or whichever user the openfire JVM runs as under Debian).

Thank you very much

It was indeed an issue with file permissions within the embedded-db directory.

In case anybody tries this in the future here a brief howto on moving Openfire from Windows to Linux:

  1. Install sun jre on your Linux Distribution

  2. Download and install Openfire server.

  3. Shutdown Openfire in the Windows machine and paste the embedded-db folder into the relevant path on your Linux machine (on Debian 6 its /var/lib/openfire/embedded-db). Note: Any customisations to the conf\openfire.xml directory will also have to be moved.

  4. Run the web based server setup from IP:9090

This works for a moving a basic(with no additional plugins) Openfire Server from Windows to Linux.

Note: The search plugin gets disabled during the above process for some reason (bug?), to get it working, download the search plugin from - http://www.igniterealtime.org/projects/openfire/plugins.jsp and install it from the plugins tab of the Web based setup at IP:9090.

HTH

Hi

you have not stated the size of your userbase. Assuming something larger than 100 (actually thats a random number), you should considr to use a “real” database as back end. To migrate the users, please consider the user import/export plugin.

Walter

hi Walter,

There are less than 50 users as of now.

I do intend to move to an external database as the number of users grows. Is there any documentation on using the user import/export plugin? What in your experience would be a good number of users to consider moving to an external database?

Thanks,

Vikram