I am geeting HTTP Status 404 error while installing DHIS2 on ubuntu. I have installed tomcat 9
My catlina.out is as follow
dhis@pfit-HP-280-G3-MT:/home/pfit$ tail -f /home/dhis/tomcat-dhis/logs/catalina.out
<6>Command line argument: -Dcatalina.base=/home/dhis/tomcat-dhis
<6>Command line argument: -Dcatalina.home=/usr/share/tomcat9
<6>Command line argument: -Djava.io.tmpdir=/home/dhis/tomcat-dhis/temp
<6>The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib]
<6>Initializing ProtocolHandler ["http-nio-8080"]
<6>Server initialization in [619] milliseconds
<6>Starting service [Catalina]
<6>Starting Servlet engine: [Apache Tomcat/9.0.31 (Ubuntu)]
<6>Starting ProtocolHandler ["http-nio-8080"]
<6>Server startup in [86] milliseconds
dhis.conf file is as follow
# ----------------------------------------------------------------------
# Database connection
# ----------------------------------------------------------------------
# Hibernate SQL dialect
# connection.dialect = org.hibernate.dialect.PostgreSQLDialect
# JDBC driver class
connection.driver_class = org.postgresql.Driver
# Database connection URL
connection.url = jdbc:postgresql:dhis2
# Database username
connection.username = dhis
# Database password
connection.password = dhis
connection.schema = dhis2
# ----------------------------------------------------------------------
# Server
# ----------------------------------------------------------------------
# Enable secure settings if deployed on HTTPS, default 'off', can be 'on'
# server.https = on
# Server base URL
# server.base.url = https://server.com
setenv.sh is as follow
#!/bin/sh
#
export CATALINA_HOME='/usr/share/tomcat9'
echo $CATALINA_HOME
export JAVA_HOME='/usr/lib/jvm/java-11-openjdk-amd64/'
echo $JAVA_HOME
export JAVA_OPTS='-Xms4000m -Xmx7000m'
echo $JAVA_OPTS
export DHIS2_HOME='/home/dhis/config'
echo $DHIS2_HOME
# Find the Java runtime and set JAVA_HOME
/usr/libexec/tomcat9/tomcat-locate-java.sh
# Default Java options
if [ -z "$JAVA_OPTS" ]; then
JAVA_OPTS="-Djava.awt.headless=true"
fi
startup.sh
#!/bin/sh
set -e
if [ "$(id -u)" -eq "0" ]; then
echo "This script must NOT be run as root" 1>&2
exit 1
fi
export CATALINA_BASE="/home/dhis/tomcat-dhis"
#export CATALINA_BASE="/home/dhis/tomcat-dhis"
/usr/share/tomcat9/bin/startup.sh
echo "Tomcat started"
echo "PWPL"
I have installed another sample war file for testing on the same server which is working properly.