Labkey error samson jacob  2019-08-06 12:50
Status: Closed
 

Hi i am having trouble starting up the labkey server : It is an old build (labkey 15) that is being restored to then do a proper upgrade,
any help is appreciated

500: Unexpected server error
A failure occurred during LabKey Server startup.

org.springframework.jdbc.BadSqlGrammarException: SqlExecutor.execute(); bad SQL grammar []; nested exception is org.postgresql.util.PSQLException: ERROR: column "keyvariable" of relation "propertydescriptor" does not exist
Position: 580
at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:111)
at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:37)
at org.labkey.api.data.ExceptionFramework$1.translate(ExceptionFramework.java:31)
at org.labkey.api.data.SqlExecutor.execute(SqlExecutor.java:102)
at org.labkey.api.data.SqlExecutor.execute(SqlExecutor.java:71)
at org.labkey.api.data.Table.update(Table.java:792)
at org.labkey.api.data.Table.update(Table.java:664)
at org.labkey.api.exp.OntologyManager.updatePropertyDescriptor(OntologyManager.java:2286)
at org.labkey.api.audit.AbstractAuditTypeProvider.ensureProperties(AbstractAuditTypeProvider.java:192)
at org.labkey.api.audit.AbstractAuditTypeProvider.initializeProvider(AbstractAuditTypeProvider.java:135)
at org.labkey.api.audit.AbstractAuditTypeProvider.<init>(AbstractAuditTypeProvider.java:88)
at org.labkey.core.query.UserAuditProvider.<init>(UserAuditProvider.java:47)
at org.labkey.core.CoreModule.startupAfterSpringConfig(CoreModule.java:591)
at org.labkey.api.module.SpringModule.doStartup(SpringModule.java:113)
at org.labkey.api.module.DefaultModule.startup(DefaultModule.java:270)
at org.labkey.api.module.ModuleLoader.completeStartup(ModuleLoader.java:1257)
at org.labkey.api.module.ModuleLoader.access$200(ModuleLoader.java:122)
at org.labkey.api.module.ModuleLoader$2.run(ModuleLoader.java:1220)
Caused by: org.postgresql.util.PSQLException: ERROR: column "keyvariable" of relation "propertydescriptor" does not exist
Position: 580
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2270)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1998)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:570)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:420)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:413)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
at org.labkey.api.data.dialect.StatementWrapper.execute(StatementWrapper.java:805)
at org.labkey.api.data.SqlExecutor$NormalStatementExecutor.execute(SqlExecutor.java:141)
at org.labkey.api.data.SqlExecutor$NormalStatementExecutor.execute(SqlExecutor.java:117)
at org.labkey.api.data.SqlExecutor.execute(SqlExecutor.java:95)
... 14 more

 
 
Jon (LabKey DevOps) responded:  2019-08-20 16:40
Hi Samson,

What specific version of LabKey is this? There are three different versions of 15: 15.1, 15.2, and 15.3.

There isn't much to go on with this error without knowing more about the environment.

Did you install or upgrade any of the components before you got this error?

What version of Tomcat is on the server? What version of Java? What version of PostgreSQL?

What operating system are you running exactly? Is this on Windows or a Linux environment?

Do you have the labkey.log file and the catalina logs from your Tomcat logs directory that we can look at?

When you say it's "being restored", what do you mean exactly? Restored as in you took the database and copied it to another server and then installed LabKey on that server?

Regards,

Jon
 
samson jacob responded:  2019-08-21 08:41
Hi Jon,
 I Apologize for the lack of information. I thought maybe this is a common error.

What specific version of LabKey?
Version 15.1

Did you install or upgrade any of the components before you got this error?
The server was restored to a backup date before I made attempts at upgrading the software.

What version of Tomcat is on the server? What version of Java? What version of PostgreSQL?
Tomcat 7.0.62
Java 1.7.0
PostgreSQL : 9.3.14

What operating system are you running exactly? Is this on Windows or a Linux environment?
Linux amd64-64 (Redhat)

Do you have the labkey.log file and the catalina logs from your Tomcat logs directory that we can look at?
yes (attached)

When you say it's "being restored", what do you mean exactly? Restored as in you took the database and copied it to another server and then installed LabKey on that server?
I made attempts at making upgrades to this instance which failed, and we restored the linux vm and the PostgreSQL server to backups before these attempts.
 
Jon (LabKey DevOps) responded:  2019-09-05 14:17
Hi Samson,

It looks like the logs do not reflect the original problem, so we are not able to properly assess what is going on right now.

If your instance of LabKey server isn't running, I would recommend doing the following:

1. Stop all instances of Tomcat, including killing all Tomcat processes (your catalina.out log shows multiple times where the same port was being used, which leads me to believe you had multiple versions of Tomcat running).

2. Make sure your labkey.xml file (located at /admhome/adm_colanar1/apache-tomcat-7.0.62/conf/Catalina/localhost/labkey.xml) is using the correct Context docBase path. There was an error in the catalina.out directory indicating that the path was either incorrect or the permissions were wrong for the user running the Tomcat process:

java.lang.IllegalArgumentException: Document base /admhome/adm_colanar1/apache-tomcat-7.0.62/webapps/labkey does not exist or is not a readable directory
    at org.apache.naming.resources.FileDirContext.setDocBase(FileDirContext.java:136)
    at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:5145)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5330)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:677)
    at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1912)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

3. Make sure that the user that is running the Tomcat service has enough permissions within the directory where LabKey is installed (your catalina.out log shows a lot of permission problems)

4. Start Tomcat

5. If an error appears, then supply us with the revised logs and also copy/paste the full error in your reply.

Regards,

Jon