Not able to see DHIS2 login page

Hello guys,

I’m pretty new here. Im trying host DHIS2 locally on Ubuntu 22.04LS. So i have followed each and every step mentioned in the official documentation(Installation - DHIS2 Documentation) and at the end after starting the tomcat sucessfully, when I go to http://localhost:8080, I’m only getting to the tomcat welcom page, not the DHIS2 login page. Im not sure what exactly wrong here. Any help is appreciated.
PS: I installed tomcat9 instead of tomcat8.

Thanks

Hi @amalg

Welcome to the community!

Perhaps try http://localhost:8080/dhis2 instead? You need to review the configuration for the root url.

Thanks!

Hello @Gassim,

Thanks for the response. Tried the same, but no luck.

Please check in the directory you installed Tomcat, what is the name of the file in the CATALINA_HOME/webapps folder?

If the war file is called root.war please rename it to dhis2.war and also check in the folder (CATALINA_HOME/conf/Catalina/localhost) for the .xml file which has a value: docBase.

If none of the above works, please check the Catalina.out log? Would you share the complete log (without the sensitive/authentication info)?

Thanks!

2 Likes

Hello @Gassim,

There is a folder inside /var/lib/tomcat9/webapps named as ‘ROOT’ and inside ROOT, there is META_INF, nothing else

Tried renaming the .war into dhis2.war, didnt work

There are no files under /home/dhis/tomcat-dhis/conf/catalina/localhost. It’s empty. So I couldnt find the .xml file you asked.

Also I could find2 catalina.out files in the system. Since I can’t attach them here, giving you a share folder link below:

DHIS2

Thanks for the info. First, sorry I meant the opposite, we’re supposed to rename the dhis2.war file to ROOT.war. However, since the webapps folder doesn’t have a “ROOT.war” file then this is the issue. Make sure to copy the dhis2.war file and rename it to ROOT.war.

Please try to repeat the following installation steps again:

The next step is to download the DHIS2 WAR file and place it into the webapps directory of Tomcat. You can download DHIS2 WAR files from the following location:

https://releases.dhis2.org/

Move the WAR file into the Tomcat webapps directory. We want to call the WAR file ROOT.war in order to make it available at localhost directly without a context path:

mv dhis.war tomcat-dhis/webapps/ROOT.war

DHIS2 should never be run as a privileged user. After you have modified the setenv.sh file, modify the startup script to check and verify that the script has not been invoked as root.

#!/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"
/usr/share/tomcat8/bin/startup.sh
echo "Tomcat started"

(source)

After that make sure to run dhis2:
sudo -u dhis tomcat-dhis/bin/startup.sh

Note that above the directory is for tomcat8 but it could be tomcat9…etc please double check the directories.

I hope this helps. If none of the above doesn’t solve the issue, it just means we need more investigation to understand the issue. Thanks!

1 Like