HTTP Status 404 – Not Found

LabKey Support Forum
HTTP Status 404 – Not Found Bika  2023-11-02 02:05
Status: Active
 

Hello,

I installed OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9 and apache-tomcat-9.0.82 and PostgreSQL-15 and LabKey23.3.12-15-community in ubuntu18.04.5. After installation running http ://localhost:8080/ works fine. HTTP Status 404 - Not Found appears when running http://localhost:8080/labkey. After diagnosing myself, I found that <CATALINA_HOME>/logs does not have labkey.log and labkey-errors.log.

Thanks,
Bika

 
 
mohara responded:  2023-11-21 18:38

Hi Bika:
Apologies for the delayed reply. It sounds like there may be a problem with the contents or location of your labkey.xml file.

When you say "http://localhost:8080/" works fine, what do you see exactly at that URL? Is it the tomcat startup page, or the working LabKey Server?

Assuming it's the tomcat page, a few things about your labkey.xml file to clarify:

  1. Is it located in the <TOMCAT_HOME>/conf/Catalina/localhost directory?

  2. Is there also any other *.xml file in there (such as ROOT.xml)?

  3. The version you sent has the database username as "labkey" and " password="******" -disappear"
    That ****** as password is presumably from you cleaning it up before posting. Can you confirm that those credentials are correct as an admin user on your data source?
    I'm not familiar with the -disappear parameter and would need to confirm whether it is supported in the resource configuration. Can you retry without that parameter?

  4. I am also more familiar with windows configurations of labkey.xml files - can you check that the docBase value here is correct?
    <Context docBase="LABKEY_HOME>/labkeywebapp" reloadable="true" crossContext="true">

Typically the actual path to that labkeywebapp location would be there. In our documentation example, that line reads:
<Context docBase="C:\labkey\labkey\labkeyWebapp" reloadable="true" crossContext="true">

Generally, I'd recommend rechecking the installation steps including those about the labkey.xml file. And of course, ideally you've sorted this out in the meantime.

Let me know if you are still unable to start your server.
--Molly

 
mohara responded:  2023-11-21 18:47

One more idea: the contents of the catalina.out log may give you more information as well about what's happening during startup.

 
mohara responded:  2023-11-22 08:41

Hi again, Bika:

I just noticed you specify you used "OpenJDK17U-jdk_x64_linux_hotspot_17.0.9_9". As listed on our supported technologies page, we recommend (and use ourselves) Eclipse Temurin 17 from Adoptium. This may not be the cause of the specific startup error, but you should confirm that you're using supported components in general:

--Molly

 
Bika responded:  2023-11-24 19:56

Hi Molly and Mohara:

I checked the installation as per your reply comments (https://www.labkey.org/Documentation/wiki-page.view?name=installComponents). Checked catalina.out. modified labkey.xml. problem still not solved.

Thanks,
Bika

 
mohara responded:  2023-11-25 12:15

Hi Bika:

The exception in your catalina.out file shows what's happening:
Caused by: java.lang.IllegalArgumentException: The main resource set specified [/usr/local/labkey/apps/apache-tomcat-9.0.82/webapps/labkey] is not a directory or war file, or is not readable (it does not exist or permissions to access it are missing)

This indicates that it's 'looking for' LabKey under your tomcat installation instead of under the LabKey enlistment where it almost certainly is located. We use $LABKEY_HOME as shorthand in our docs for the variable location of that installation. However, the way you have this in your labkey.xml file:
docBase="LABKEY_HOME/labkeywebapp"

...it's trying to find a relative path under tomcat, i.e. a directory with that variable name, which isn't right. Replace LABKEY_HOME in your labkey.xml file with the absolute path to where it is instead. For example, something like this if you followed our installation docs:
docBase="/usr/local/labkey/labkey/labkeywebapp"

Hope that helps,
--Molly

 
Bika responded:  2023-11-27 01:27

Hi Molly and Mohara:

Problem solved and working.

Thank you very much.
Bika