×
We value your feedback! Please click here to access our 2024 Client Survey.
The survey will remain open until November 1st. Your perspective will help guide our product/service planning and goals for the upcoming year and beyond!

Upgrade from v19 to v23

LabKey Support Forum
Upgrade from v19 to v23 scott  2024-09-18 07:45
Status: Active
 

Hi all,

After a lull in the internal usage, we are getting around to upgrading our LabKey installation from 19.1.1-63156.2 to 23.11.11-11-13. We have successfully complied with the platform requirements:

Tomcat v9.0.17
JVM v17.0.6+9-LTS-190
Postgres 13.3 (Ubuntu 13.3-1.pgdg16.04+1)

Config files seem to be working properly, data has been upgraded and has data in it.. but when I try to initialize the new LabKey webapp, there is a database error:

org.labkey.api.util.ConfigurationException: core-0.000-22.000.sql : SqlExecutor.execute(); bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: type "uniqueidentifier" already exists
org.labkey.api.util.ExceptionUtil.renderErrorPage(ExceptionUtil.java:1036)
org.labkey.api.util.ExceptionUtil.handleException(ExceptionUtil.java:953)
org.labkey.api.util.ExceptionUtil.handleException(ExceptionUtil.java:681)
org.labkey.api.security.AuthFilter.doFilter(AuthFilter.java:91)
org.labkey.core.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:120)

Site won't load and log files show that the system is trying to run (presumably) an upgrade script - which is where the page load is failing.

Any Ideas how to fix this? We did not do each of the intermediate upgrades from 19 to 23.. we DID upgrade previously from 17.3-55100.13 to 18.1-57017.17 and then to 19.1.1-63156.2. Not sure if that matters here or not.

Thanks!

 
 
mohara responded:  2024-09-18 10:13

Hi Scott, and thanks for reaching out.

Yes, the intermediate upgrades definitely make a difference. The previous 17.3->18.1->19.1 upgrade sequence should be fine (you may want to check the logs to be sure), but from there, you can't leap straight to 23.11.

You'll also need to interleave some upgrades of Java and Postgres - you can edit the URL to step through the documentation archives to find out which versions are supported for which LabKey versions. I've linked one general plan below, but you can adjust as you like within the options supported.

You'll first need to roll back to the 19.1 database, and the Java and Postgres versions you were using previously.

From there you can go to 21.7 - using Supported Components for 21.7
then 22.11 - using Supported Components for 22.11
and then 23.11 using the Supported Components for 23.11

An important note is that after 23.11, LabKey is distributed with Tomcat embedded in it. This will greatly simplify the installation and upgrade process going forward, but that process is different and requires some migration steps. For all the above upgrades to get you to 23.11, you want to be following the older upgrade process you've been using. If needed, you can find it in the documentation archives:

Once you get to that version, you'll be able to follow the migration and upgrade process to 24.7 in the current documentation.

I'm glad to hear you're picking up with LabKey again. A lot has changed in the last few years! If you're interested in learning more about our products and premium editions, contact us here to set up a demo .

--Molly

 
scott responded:  2024-09-18 10:34

Hi Molly, - thanks for the quick and detailed reply. So our previous 19.1 install was previously using postgres 9.6, tomcat 7.x and I am not 100% sure what JVM we were using..

So it seems to me, given the system requirements, that we may not have to roll anything back (maybe just JVM?).. and then step through each of the labkey upgrade files / scripts for each version to capture the progressive updates? Does that make sense? That would be much easier too than rolling everything back..

Any chance someone has / can prepare a consolidated script from each of the versions you listed above? Would make live much easier..

Thanks

 
mohara responded:  2024-09-18 11:56

Alas, there isn't a more consolidated strategy for this kind of multi-year upgrade, and you definitely don't want to manually run any of the schema upgrade scripts. The server upgrade process will take care of that and other necessary parts of keeping things in sync. Any sort of custom scripting or detailed upgrade assistance for your specific scenario would only be available with a premium subscription.

One other alternative, depending on what you have been using LabKey for/what kinds of data you want to move forward, is to install a brand new/empty instance of 24.7 (with embedded Tomcat). This new-installation is a simpler and even scripted install process, covered here. Then migrate work using folder archives or individual spreadsheet export from the old instance and import into the new one. Watching the logs at every step is always important to catch any issues, whether you go the database upgrade or old->new data migration route.

Hope this helps,

--Molly