SUSE Support

Here When You Need Us

Web User Interface fails to load with: HTTP Status 404 – not found

This document (000021077) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Manager Server 4.3

Situation

After applying updates and restarting the server, attempting to open the Web User Interface (WebUI) fails with the following error:
 
HTTP Status 404 - not found
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists

There can be various different reasons for seeing this error, one scenario is when In the /var/log/tomcat/catalina.out log file the following are logged, excerpt:
 
16-May-2023 13:40:40.599 SEVERE [main] org.apache.catalina.startup.HostConfig.beforeStart Unable to create directory for deployment: [/etc/tomcat/Catalina/localhost]
16-May-2023 13:40:40.618 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/srv/tomcat/webapps/rhn]
16-May-2023 13:40:40.694 WARNING [main] org.apache.catalina.core.StandardContext.postWorkDirectory Failed to create work directory [/usr/share/tomcat/work/Catalina/localhost/rhn] for context [/rhn]
 ...
16-May-2023 13:40:55.027 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/rhn] startup failed due to previous errors

 
Another cause is when the following stack trace is seen in "/var/log/tomcat/catalina.out":
 
25-Jul-2023 13:36:29.413 SEVERE [main] org.apache.catalina.startup.HostConfig.deployDirectory Error deploying web application directory [/srv/tomcat/webapps/rhn]
    java.lang.IllegalStateException: Error starting child
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:686)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:658)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:662)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1184)
        at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1932)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1094)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:476)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1617)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:318)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:898)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:795)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1332)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1322)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:871)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:249)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:428)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:914)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:772)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:347)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:478)
    Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/rhn]]
        at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:683)
        ... 37 more
    Caused by: java.lang.NullPointerException
        at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:382)
        at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:195)
        at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:2132)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1290)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:987)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:304)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4852)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        ... 38 more

Resolution

For the first scenario, make sure the following directories under /var/cache/tomcat/ exist with the appropriate rights:
 
/var/cache/tomcat
drwxrwxr-x 3 root tomcat   23 Apr 24 10:59 Catalina
drwxrwx--- 2 root tomcat 4096 Apr 24 11:00 temp
drwxrwx--- 3 root tomcat   22 Apr 24 10:59 work

 
For the second scenario, verify the "netty.rpm" package (rpm -Vv netty), no files should be reported as "missing". The package should also have been installed from the "SUSE-Manager-Server-4.3-Updates" repository which can be verified by looking at the output of the command "zypper if netty".

Cause

First Scenario:

Missing directories / incorrect rights in /var/cache/tomcat

Second Scenario:

The PackageHub module was enabled on the server and the "netty.rpm" package was the incorrect version installed from PackageHub. This resulted in dangling symlinks in the "/srv/tomcat/webapps/rhn/WEB-INF/lib/" directory causing tomcat startup to fail. Force re-install the correct package by running for example:
 
zypper in --repo SLE-Module-SUSE-Manager-Server-4.3-Updates -f netty 

Additional Information

There are additional reasons why WebUI access fail due to tomcat not starting properly, also see TID 000021017 .

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000021077
  • Creation Date: 19-May-2023
  • Modified Date:27-Jul-2023
    • SUSE Manager Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.