Deploying on Linux server with Tomcat 8.5.35, getting 404 error

Installation Forum (Inactive)
Deploying on Linux server with Tomcat 8.5.35, getting 404 error gstarbuck  2018-09-17 10:22
Status: Closed
 

So I am following the instructions to configure LabKey on Linux found here: https://www.labkey.org/Documentation/wiki-page.view?name=configTomcat

Tomcat and postgres are up and running, and I have worked through to step 4, move the LabKey Server configuration file. When I got to this step, there was no /conf/Catalina/localhost/ directory in my install - I created one and then put the labkey.xml there.

I then continued through to step 11, Tomcat is running, and the landing page comes up. But when I go to /labkey, it throws a 404 not found error:
Type Status Report

Message /labkey

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

Is this a known issue? Is it unusual for the "/conf/Catalina/localhost" directory to not exist after an install? I could use any help debugging this.

 
 
Jon (LabKey DevOps) responded:  2018-10-01 14:41
Hi Guy,

The TOMCAT_HOME/conf/Catalina/localhost directory automatically gets created when you start up Tomcat and access it for the first time, but you can build it yourself if you want. You would just need to make sure that the directories and the labkey.xml file itself is set to the correct owner that will be running the Tomcat process.

Also, when you setup Tomcat to work with LabKey, you must make sure that the five JAR files that were in your LabKey install file that was in a zip or tar.gz (they would have been located in a tomcat-lib directory):

tomcat-lib/jtds.jar
tomcat-lib/mail.jar
tomcat-lib/mysql.jar
tomcat-lib/postgresql.jar
tomcat-lib/labkeyBootstrap.jar

You'll need to make sure these five JARs get copied over to the TOMCAT_HOME/lib directory and the owner of the files is set properly as well.

It's usually missing JARs and/or file ownership that can create problems like these.

Please give these a look. One place you'll definitely be able to see whether any issues were detected is by looking at the catalina.out log file that Tomcat produces in the TOMCAT_HOME/logs directory. The labkey.log file is another one that can provide great details to the issue if it generated, however based on your description, I believe that Tomcat couldn't start up the LabKey web application due to either missing JAR files or having JAR files that were not set properly for ownership.

Regards,

Jon