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.



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

Problem Tomcat 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
Solution Make 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.


Problem Error when connecting to LabKey server on Linux: Can't connect to X11 window server or Could not initialize class ButtonServlet.
Solution Run tomcat headless. Edit tomcat's catalina.sh file, and add the following line near the top of the file:


Then restart tomcat.



Viewing certain pages results in a specific NoSuchMethodError.

       at org.labkey.jsp.compiled.org.labkey.core.admin.maintenance_jsp._jspx_meth_labkey_005ferrors_005f0(maintenance_jsp.java:159)
       at org.labkey.jsp.compiled.org.labkey.core.admin.maintenance_jsp._jspService(maintenance_jsp.java:110)
       at org.labkey.api.view.JspView.renderView(JspView.java:170)
       at org.labkey.api.view.WebPartView.renderInternal(WebPartView.java:372)


Upgrade your Apache Tomcat deployment to a supported version.



After upgrading LabKey Server the following error is shown.

java.lang.NoSuchMethodError: org.labkey.api.settings.HeaderProperties: method 'void <init>()' not found


This may be the result of a partial upgrade, where some but not all of the binaries get upgraded.
1. Shut down the Tomcat service
2. Delete your modules and labkeyWebapp directories
3. Recopy those directories form the new version you downloaded
4. Restart the Tomcat service



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:

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) ...

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.



Fatal Error in Java Runtime Environment

# 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

These are typically bugs in the Java Virtual Machine itself.


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.



If you see the following error when running complex queries on PostgreSQL:

org.postgresql.util.PSQLException: ERROR: failed to build any 8-way joins

Increase the join collapse limit. Edit postgresql.conf and change the following line:

# join_collapse_limit = 8


join_collapse_limit = 10



Plots are not rendered as expected, or cannot be exported to formats like PDF or PNG
Excel exports fail or generate corrupted xlsx files. Possible Excel export failures include 500 errors or opening of an empty tab instead of a successful export.

java.lang.InternalError: java.lang.reflect.InvocationTargetException
	at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:86)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
	at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
Caused by: java.lang.NullPointerException: Cannot load from short array because "sun.awt.FontConfiguration.head" is null
	at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1260)
	at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:223)
java.lang.InternalError: java.lang.reflect.InvocationTargetException
	at java.desktop/sun.font.FontManagerFactory$1.run(FontManagerFactory.java:86)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:312)
	at java.desktop/sun.font.FontManagerFactory.getInstance(FontManagerFactory.java:74)
Caused by: java.lang.NullPointerException
	at java.desktop/sun.awt.FontConfiguration.getVersion(FontConfiguration.java:1262)
	at java.desktop/sun.awt.FontConfiguration.readFontConfigFile(FontConfiguration.java:225)
	at java.desktop/sun.awt.FontConfiguration.init(FontConfiguration.java:107)

Install the fonts required to generate plots, most typically missing on some Linux JDK installations



One or more of:

  • Banner message reading "The WebSocket connection failed. LabKey Server uses WebSockets to send notifications and alert users when their session ends. See the Tomcat Configuration for more information."
  • Error logged to the JS console in the browser: "clientapi.min.js?452956478:1 WebSocket connection to 'wss://server.com/_websocket/notifications' failed."
  • Unexpected errors in login/logout modals for Sample Manager and Biologics applications.

Problem WebSocket connection errors are preventing a variety of actions from succeeding. Try using browser developer tools and checking the Console tab to see the specific errors.
Likely causes A load balancer or proxy may be blocking websocket connections and needs to have its configuration updated.
Solution Make sure that websockets are available and configured properly.



On Java 16 or later, pipeline jobs and some other operations fail with errors


To be compatible with some libraries, such as Jackson, Java 16 and later need to be configured with a command-line argument to allow for successful serialization and deserialization. Errors may take different forms, but include messages like:

java.lang.reflect.InaccessibleObjectException: Unable to make private java.io.File(java.lang.String,java.io.File) accessible: module java.base does not "opens java.io" to unnamed module @169268a7


java.lang.reflect.InaccessibleObjectException: Unable to make field private java.lang.String java.lang.Throwable.detailMessage accessible: module java.base does not "opens java.lang" to unnamed module @18f84035

Solution Add to the Java command line:

--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED


ERROR ModuleLoader 		2022-04-07T10:09:07,707		main : Failure occurred during ModuleLoader init.
org.labkey.api.util.ConfigurationException: Can't upgrade from LabKey Server version 20.3; installed version must be 21.0 or greater. ...
Cause Beginning in January 2022, you can only upgrade from versions less than a year old.
Solution Following the guidance in this topic, you will need to perform intermediate upgrades of LabKey Server to upgrade from older versions.


Problem Disk filling with Tomcat temporary files. For example, Excel exports might be leaving one file for every export in "temp/poifiles" folder.
...| comment: Exported to Excel | 
ERROR ExceptionUtil            2022-07-19T11:24:20,609 ps-jsse-nio-8443-exec-25 : Unhandled exception: No space left on device
java.io.IOException: No space left on device
Likely causes The Excel export writer is leaving temporary "poi-sxssf-####.xml" files behind. These can be fairly large and may correlate 1:1 with Excel exports. This issue was reported in version 22.3.5 and will be fixed in version 22.11.0 (or sooner).
Solution These temporary "poifiles" may be safely deleted after the export is completed. Administrators can periodically clean these up; when this issue is resolved, they will be automatically cleaned up within 10 minutes of an Excel export


Was this content helpful?

Log in or register an account to provide feedback

expand all collapse all