Failing to upgrade LabKey

General Server Forum (Inactive)
Failing to upgrade LabKey jmikk  2018-01-08 07:45
Status: Closed
 
Hello there,

I recently attempted to upgrade LabKey from 17.1 to 17.3. During the upgrade process, everything was going smoothly until LabKey tried to update the SqlScriptManager module. I get lots of PSQLExceptions in labkey.log (attached). After wiping the database, restoring from a 17.1 backup and trying to update again, I still ran into the same issues and was forced to abort the upgrade. We are now running smoothly, still on 17.1.

What are our options for upgrading LabKey in the future? It seems like our future upgrades are bound to fail. In the past, we had upgraded to 17.2 but downgraded back down to 17.1 after finding out that some of our DISCVR modules were not compatible yet. I'm wondering if this downgrade has caused some issues.

Thanks!
 
 
Jon (LabKey DevOps) responded:  2018-01-16 11:09
Hi,

This kind of issue can occur if the upgrade had failed midway through or if the database was upgraded while the core.modules and core.sqlscripts tables were not changed to indicate that these scripts were already ran against it.

I would recommend doing the following:

1. Shut off the Tomcat service on the server.
2. Check the core.SqlScripts table to see what modules have already ran on the server. If I'm right, that script "study-17.10-17.11.sql" is probably already listed there along with a few other scripts that ran before.
3. After you confirm what scripts have ran, you will need to update the core.modules table and update the version number accordingly.
4. Once the update has been made, start Tomcat. It should then pick up where it left off and continue running the other DB scripts to finish the upgrade.

Regards,

Jon