If you have encountered errors or other problems when installing and starting LabKey Server, first review the topic Troubleshooting: Common Issues. If you're still encountering problems, please review the list below for common errors, messages, and problems.

You can also search the LabKey Community Support Forums for guidance. If you don't already see your issue listed there, please post a new question.


1.

Error

Error on startup, "Connection refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections."

ProblemTomcat cannot connect to the database.
Likely causes
  • The database is not running
  • The database connection URL or user credentials in the Tomcat configuration files are wrong
  • Tomcat was started before the database finished starting up
SolutionMake sure that database is started and fully operational before starting Tomcat. Check the database connection URL, user name, and password in the <tomcat>/conf/Catalina/localhost/labkey.xml file.

2.

ProblemError when connecting to LabKey server on Linux: Can't connect to X11 window server or Could not initialize class ButtonServlet.
SolutionRun tomcat headless. Edit tomcat's catalina.sh file, and add the following line near the top of the file:
CATALINA_OPTS="-Djava.awt.headless=true"
Then restart tomcat.

3.

Problem

After upgrading to building with Java 8, your server may still include some trunk code that was built with Java 7.

Error

java.lang.NullPointerException
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:532)
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.Class.createAnnotationData(Class.java:3521)
at java.lang.Class.annotationData(Class.java:3510)
at java.lang.Class.getAnnotation(Class.java:3415)
at org.labkey.api.action.SpringActionController$DefaultActionResolver$DefaultActionDescriptor.<init>(SpringActionController.java:908)
at org.labkey.api.action.SpringActionController$DefaultActionResolver$DefaultActionDescriptor.<init>(SpringActionController.java:893)
at org.labkey.api.action.SpringActionController$DefaultActionResolver.addAction(SpringActionController.java:848)
at org.labkey.api.action.SpringActionController$DefaultActionResolver.addInnerClassActions(SpringActionController.java:841)
at org.labkey.api.action.SpringActionController$DefaultActionResolver.<init>(SpringActionController.java:826)
at org.labkey.immport.ImmPortController.<clinit>(ImmPortController.java:72)

Solution

Use "gradlew cleanBuild deployApp" to build from scratch.


4.

Error

You receive a message "The requested resource () is not available." OR "500: Unexpected server error" and see something like one of the following in the log file:

Problem
SEVERE: Error deploying configuration descriptor labkey.xml 
java.lang.IllegalStateException: ContainerBase.addChild: start: LifecycleException: start: : java.lang.UnsupportedClassVersionError: org/labkey/bootstrap/LabkeyServerBootstrapClassLoader : Unsupported ...
A failure occurred during LabKey Server startup.
java.lang.NoClassDefFoundError: javax/script/ScriptEngineFactory....
A failure occurred during LabKey Server startup.
java.lang.UnsupportedClassVersionError: Bad version number in .class file
       at java.lang.ClassLoader.defineClass1(Native Method)
       at java.lang.ClassLoader.defineClass(ClassLoader.java:675) ...
Solution

You may need to use a newer version of the JDK. See Install Required Components.

Confirm that Tomcat is configured to use the correct version of Java, as it is possible to have multiple versions installed simultaneously.


5.

Problem

Fatal Error in Java Runtime Environment

Error
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000000000000, pid=23893, tid=39779
#
# JRE version: Java(TM) SE Runtime Environment (8.0_45-b14) (build 1.8.0_45-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.45-b02 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C 0x0000000000000000
#
# Failed to write core dump. Core dumps have been disabled.
# To enable core dumping, try "ulimit -c unlimited" before starting Java again
Cause

These are typically bugs in the Java Virtual Machine itself.

Solution

Ensuring that you are on the latest patched release for your preferred Java version is best practice for avoiding these errors. If you have multiple versions of Java installed, be sure that JAVA_HOME and other configuration is pointing at the correct location. If you are running through the debugger in IntelliJ, check the JDK configuration: under Project Structure > SDKs check the JDK home path and confirm it points to the newer version.

Discussion

Was this content helpful?

Log in or register an account to provide feedback


previousnext
 
expand all collapse all