almalinux 9 tomcat 10 openlogic java 11 error HTTP Status 404 – Not Found
0
votes
1
answer
59
views
I would like to troubleshoot an issue that I think it happens only in my just made up environment. I have an almalinux 9 with apache tomcat 10 and openlogic jdk version 11.
Installation seemed to work fine (all using tar.gz) and I can see at ip:9080 the tomcat greeting and I can access the manager gui. And I can see that everything is owned by the existing user tomcat.
ps aux shows
tomcat 16179 0.3 7.6 9282676 1897144 ? Sl Nov26 3:47 /opt/java11/bin/java -Djava.util.logging.config.file=/opt/tomcat10j11/conf/logging.properties -Djava.util.logging.man
netstat -polent shows
tcp6 0 0 :::9080 :::* LISTEN 1000 152959 16179/java off (0.00/0/0)
I copied some war files inside the /opt/tomcat10j11/webapps/ folders and the logs from catalina.out are telling me that for every war file I got
SEVERE [Catalina-utility-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/opt/apache-tomcat-10.1.33/webapps/name_of.war]
java.lang.IllegalStateException: Error starting child
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.WarResourceSet@533c9e9a]at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:406)
Caused by: java.lang.IllegalArgumentException: java.io.FileNotFoundException: /opt/apache-tomcat-10.1.33/webapps/name_of.war (Permission denied) at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:141)
So my assumption is that permission denied means that the folder and the file should be owned by tomcat. At that point I run
chown -R tomcat:tomcat /opt/apache-tomcat-10.1.33/
after that I try to restart the server, but I keep getting the 404 error.
Where should I look and how can I troubleshoot tomcat/war deployment?
Asked by Malkavian
(131 rep)
Nov 27, 2024, 11:30 AM
Last activity: Nov 27, 2024, 02:09 PM
Last activity: Nov 27, 2024, 02:09 PM