Openfire Upgrade from 3.5.2. to 3.6 Fails

Does no one actually back up before upgrading?

You can still build the plugins from SVN if you check out https://svn.igniterealtime.org/svn/repos/openfire/branches/openfire_3_5_2

My concern about downgrading to 3.5.2 without restoring your database is that you’ve partially upgraded to 3.6.0 at that point. Now, I’ve identified where the problem was and fixed it, so I’m going to publish 3.6.0a with instructions on how to “fix your db” so the upgrade will perform correctly, but right now your db is “sorta kinda” corrupted. (not too bad that 3.5.2 won’t work obviously)

Testing upgrades in a test environment is good, too…

Thanks for the quick work on this, Daniel. I’m looking forward to the 3.6.0a install, it (3.6.0 in generall…) sounds like it’s going to solve some key issues.

rculpepper wrote:

Testing upgrades in a test environment is good, too…

Unfortunately my test environment failed me big time. In some cases I’m not sure how it even worked!

I actually have 4 live servers I run, and test against all of the supported DBs except for Sybase, which I don’t seem to be able to locate something I can use for. (and I’m not even convinced anyone is using it for Openfire)

Of course, wanna know what did me in the most this time?

I tested a -fresh- setup, instead of testing something that had a lot of data in it. Specifically, I hadn’t created any MUC rooms and having some is what caused the upgrade to fail. Lesson learned =( Unfortunately this was also a “quick release” instead of having proper QA time and even putting out a beta first. =/

Just a couple of factors came together to screw things over. I think I’ve fixed all of the most important issues at the moment and am testing in a number of DBs before pushing it out. I think after this is over I’m going to build a Wildfire install with a lot of data in it that is my “base” setup that will get copied and upgraded every time to the latest to make sure things work right. VMs for the win. =)

Not a shining day for my confidence for sure.

If u need the hardware open the donation system. We support them.

But yours pay it cool features we cannot use and support (donation) them.

I mainly meant for end users like me

Luckily (or unluckily, in some situations…) we have extremely tight data retention policies on anything communication related. We make nightly backups of everything, so I just restored one of those to my test environment and tested out the upgrade.

Same problem here. I’m not using LDAP, but I am using MSSQL 2005. Fortunately it seems the database was not modified by the upgrade. The upgrade process itself completed, but after that Openfire doesn’t seem to be able to access the database and the server (and thus the admin) won’t start. Backing out to 3.5.2 fixed the problem without having to restore the database from a backup.

It might be a good idea to include a warning next to the d/l links… or even suspend the distribution of 3.6 until the 3.6a is released.

Why does no one believe me when I say that things have happened to your db that will prevent the upgrade to 3.6.0a from going smoothly if you don’t roll back your db to 3.5.2? =) I’m going to try to post some “here’s how you fix up your db” stuff with the 3.6.0a announcement though.

And at this point it would take longer to take the old one down than to release the new one.

sigh … I suppose I’ll restore the database. At least I have a backup.

There’re probably too many conversations going on at once in this comment thread… I just skimmed them over and missed the note that the db has been impacted (I suppose I would’ve found it out when trying to install 3.6a).

=) Well for what it’s worth, I wasn’t mocking you or anything. I’ve just said the same thing over and over and keep getting told “well my database looks fine” so I am bracing myself for lots of “hey this didn’t work” when people trying 3.6.0a. Here’s hoping folk read my release announcement and make note of what they have to do!!! Thanks for backing up to your restore though. =) Will make one less conflict!

None taken. It was good that you pointed it out as I would have found out that there was a problem on upgrade to 3.6.0a. Thanks to Genie Backup Manager restore of MSSQL database was a breeze.

Daniel,

Just tried an upgrade from 3.5.2 to 3.6.0a and experianced the same MUC reference problem and the upgrade failed.

You mentioned 3.6.0a with instructions on how to “fix your db”.

Should the upgrade from 3.5.2 to 3.6.0a work straight out of the box or will your “fix your db” be necessary?

If the “fix your db” step is required, can you help with a link to these notes.

At the moment we have rolled back to 3.5.2 after restoring the openfire SQL database.

Thanks in advance.

Best Regards
Alan

Hello everybody,

I’m trying to to upgrade from 3.5.2 to 3.6.1 using Microsoft SQL Server for the database. 3.6.1 detects an older version of the database, and then it fails to upgrade. Can anyone please help? The following is in my error.log file:

2008.11.18 05:49:32 [org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:38 3)] SchemaManager: Failed to execute SQL:
CREATE TABLE mucService ( serviceID INT NOT NULL, subdomain NVARCHAR(255) NOT NULL, description NVARCHAR(255), CONSTRAINT mucService_pk PRIMARY KEY (subdomain) );
2008.11.18 05:49:32 [org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:273)]
java.sql.SQLException: There is already an object named ‘mucService’ in the database.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.processResults(JtdsStatement.java:584)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQL(JtdsStatement.java:546)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeImpl(JtdsStatement.java:723)
at net.sourceforge.jtds.jdbc.JtdsStatement.execute(JtdsStatement.java:1157)
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 org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
at $java.sql.Statement$$EnhancerByProxool$$5ffe209.execute()
at org.jivesoftware.database.SchemaManager.executeSQLScript(SchemaManager.java:378 )
at org.jivesoftware.database.SchemaManager.checkSchema(SchemaManager.java:270)
at org.jivesoftware.database.SchemaManager.checkOpenfireSchema(SchemaManager.java: 71)
at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectio nManager.java:498)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:79)
at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:335)
at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:73)
at org.jivesoftware.util.JiveProperties$JivePropertyHolder.(JiveProperties .java:40)
at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:52)
at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:532)
at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:298)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:415)
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.11.18 05:49:32 [org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:346)]
java.sql.SQLException: Invalid object name ‘ofProperty’.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatem ent.java:777)
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 org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
at $java.sql.Statement$$EnhancerByProxool$$82283445.executeQuery()
at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:337)
at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:73)
at org.jivesoftware.util.JiveProperties$JivePropertyHolder.(JiveProperties .java:40)
at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:52)
at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:532)
at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:298)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:415)
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.11.18 05:49:32 [org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:709)] Database could not be accessed
java.sql.SQLException: Invalid object name ‘ofID’.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatem ent.java:777)
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 org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
at $java.sql.Statement$$EnhancerByProxool$$82283445.executeQuery()
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:700)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:427)
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.11.18 05:49:32 [org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:457)]
java.lang.IllegalArgumentException: java.sql.SQLException: Invalid object name ‘ofID’.
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:710)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:427)
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)
Caused by: java.sql.SQLException: Invalid object name ‘ofID’.
at net.sourceforge.jtds.jdbc.SQLDiagnostic.addDiagnostic(SQLDiagnostic.java:368)
at net.sourceforge.jtds.jdbc.TdsCore.tdsErrorToken(TdsCore.java:2816)
at net.sourceforge.jtds.jdbc.TdsCore.nextToken(TdsCore.java:2254)
at net.sourceforge.jtds.jdbc.TdsCore.getMoreResults(TdsCore.java:631)
at net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:477)
at net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatem ent.java:777)
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 org.logicalcobwebs.proxool.ProxyStatement.invoke(ProxyStatement.java:100)
at org.logicalcobwebs.proxool.ProxyStatement.intercept(ProxyStatement.java:57)
at $java.sql.Statement$$EnhancerByProxool$$82283445.executeQuery()
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:700)
… 16 more

Hi,

Thanks for posting your tracebacks. How comfortable are you with MsSQL and running commands manually? Would you be willing to try running each database upgrade script manually and then post which SQL commands it fails on? You can find these sql commands in the resources/database/upgrade folder, one numbered for each schema revision bump. You are probably at #16 now…

My guess is that your database is not in the expected state #16, due to previous uncaught upgrade bugs…

daryl

Hi,

Were the “how to fix your DB” and related upgrade notes ever published? If so, would it be possible to post a link here?

Best regards

I had the same upgrade failures in trying to go from 3.5.2 to 3.62.

I looked at the 19 and 20 directories as indicated and ran the SQL manually against my MYSQL database.

Looks like there were problems with a couple indexes. Indexes simply didn’t exist for a couple tables, when it ran into problems trying to drop an index that didn’t exist, the script stopped.

I just didn’t attempt to remove the missing indexes, and all was well.

If you’d like a copy of my original DB, I believe I can make that available.

I’m having trouble finding a solution to this same problem.

I just installed Openfire 3.6.4 with local SQL and AD LDAP, installed some Plugins. Everything worked awesome, until i quit and relaunch the app. Now i get errors when trying to start the service debug.log access denied, java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@f7…

Files\Openfirew\embedded-db\openfire.lck,exists=true, locked=false valid=false, fl=null]: java.io.FileNotFoundException: C:\Program Files\Openfire\embedded-db\openfire.lck(Access is denied) … If i reinstall the software over the top of my current install, it works again, until i quit and relaunch the application.

scott94583 has joined the room.

I’ve rebooted which did not help. I previously had ejabberd installed, but its gone now. I granted the openfire ldap account admin rights to the server, but that did not do anything, either. Scratching my head…

Thanks!

I just installed a fresh copy of OpenFire. I’m running Win7 Ultimate and using the embedded DBs. I had it all set up and was testing with several user accounts. After restarting my computer, I kept getting this exact error message.

I discovered that, even if you’re already an administrator, you may still have to right-click and ‘run as administrator’. Just doing that solved my problem completely - without having to downgrade or anything.

Hope that helps.

Cheers.