error while trying to rebuild an old labkey configuration

LabKey Support Forum
error while trying to rebuild an old labkey configuration niloofar nickaeen  2023-12-18 02:58
Status: Active
 

Hi. Our previous system administrator had configured Labkey using: Oracle JDK 1.8.0_181-b13, Apache Tomcat 8 and Labkey 18.2, postgresql 9.5.
Now I am sked to recreate the whole configuration, preferably with newer versions. I am on Ubuntu 22.04.3 LTS (Jammy) . I am using Labkey 23.7.4-7, Apache Tomcat 9 and OpenJDK17U and postgresql 15.5.
I followed the installation instructions and managed to successfully see the start up window for Labkey. at this point I am using an empty "labkey" database. I then proceeded to back up the previous database and files.
I backed up "Files" from /usr/local/labkey/files and put it in the same directory in the new configuration.
I furthermore, backed up and restored the old database in the empty "labkey" database.

However, now I get this error (I have attached screenshots of the whole log):

  • HTTP Status 500 – Internal Server Error
  • org.labkey.api.util.ConfigurationException: Error running scripts in module Core
  • org.postgresql.util.PSQLException: ERROR: cannot drop view core.activeusers because other objects depend on it
    Detail: view core.contacts depends on view core.activeusers
    Hint: Use DROP ... CASCADE to drop the dependent objects too.
    Where: SQL statement "DROP VIEW core.activeusers"

can you please help me with that?

 
 
mohara responded:  2023-12-18 10:19

Hi:

You won't be able to upgrade an 18.2 LabKey database directly to version 23.7. Those errors indicate problems making 'leaps' instead of the supported steps to upgrade modules and schemas. Please refer to this topic to help decide which intermediate steps you'll want to make. At first glance, 18.2 to 20.7, then 20.7 to 21.11, 21.11 to 22.11, and finally 22.11 to 23.11 (recommended over 23.7 as it was released about a month ago) might be the shortest path.

Keep in mind that with each step, you must use supported versions of Java, Tomcat, and Postgres, so you may also need to upgrade those in steps (particularly the JDK). You can find the supported versions of components for each LabKey version in the documentation archives. For example, in 20.7, this page shows which versions of Java, Tomcat, and Postgres are supported.

You can move through the archives easily by editing the URL to replace the version number, then make an upgrade component 'step' plan to get from 18.2 to 23.11 that works best for you. A few surrounding releases are shown on each grid, though there is no comprehensive grid going all the way back to 2018.

Obtain the necessary intermediate releases of LabKey Server from this page:

We highly recommend being careful to back up the database before every step in your upgrade plan and test at least basic functionality at each step, in order to be able to go back and retry with a different combination if necessary. Be even more careful never to 'downgrade' a database (i.e. start up using a database that was either fully or partially upgraded to a later release) as this can corrupt data and/or put the server in a bad state.

Hope that helps,

--Molly

 
niloofar nickaeen responded:  2023-12-19 03:24

Thank you so much Molly.

and another question, in the Link for the previous releases, I cannot find the download link for the binaries - Labkey version 18.2. Only documents are there. can you also help me with this?

Thank you.

 
mohara responded:  2023-12-19 09:00

We don't generally provide (or recommend) binaries that old, though you can also step back into the archives by version for that page. We've changed the queries that back the list over time, so it isn't populated in all archives, but at least one version includes 18.2:

I want to emphasize that this is not a trivial upgrade series, and we're unable to offer custom support on this forum. Depending on the scope of data stored in the current LabKey instance, it may make more sense to manually migrate data using export from the current instance and reimport to the new empty database. If the scope is large or complex, I'd recommend getting in touch via our website so that we can discuss custom upgrade support, including that moving to our cloud would certainly make things easier for you. Let us know what you're already accomplishing with LabKey Server. We're glad you got in touch and here to help!

--Molly