I am a newbie to DHIS. I had installed DHIS2 (i think version 2.34) on AWS EC2 (Ubuntu 20.04/tomcat 9). After installation, the DHIS2 login page was available. We could not do much progress. But we were not able to start using it. So, i stopped the AWS instance to save cost. But when I restarted the instance, the DHIS server did not load. Instead I am getting the tomcat startup page . What could the problem and how to solve it.
I tried to stop the tomcat server (from /usr/share/tomcat/bin folder) and I get the following error
> java.io.FileNotFoundException: /usr/share/tomcat9/conf/server.xml (No such file or directory)
Then I tried to stop from /home/dhis/tomcat-dhis/bin/shutdown.sh, I get the message
but i could still get the tomcat home page.
Then i tried sudo service tomcat9 stop, I do not get any message but the webpage stops
Wen and I restart the DHIS server from /home/dhis/tomcat-dhis/bin/startup.sh or by sudo service tomcat start, I get the the tomcat server home page with one of the line saying as Tomcat veterans might be pleased to learn that this system instance of Tomcat is installed with CATALINA_HOME in /usr/share/tomcat9 and CATALINA_BASE in /var/lib/tomcat9, following the rules from /usr/share/doc/tomcat9-common/RUNNING.txt.gz.
Please, if somebody could help me in understanding the error, its cause and its solution.
Hey thank you @amitta for your question! I will make sure to follow up for support for your issue!
I read that the message you are seeing “Tomcat veterans…etc” means that you’ve setup tomcat successfully, would you like to make sure that the DHIS2 WAR file is in the webapps directory of Tomcat? And that you have renamed the WAR file as ROOT.war? Also, make sure you are running tomcat using user dhis
sudo -u dhis tomcat-dhis/bin/startup.sh
This is my attempt to support you, but if it doesn’t work please wait until I get one of the experts to support you!
@amitta, if it is possible please use: tail -f tomcat-dhis/logs/catalina.out to have the logs ready in case the DHIS2 expert needs them to assist you!
Yes we have the file ROOT.war in webapps folder which is in tomcat-dhis folder. i.e. /home/dhis/tomcat-dhis/webapps/ROOT.war
Yes we used sudo -u dhis tomcat-dhis/bin/startup.sh to start it.
Still the same result. Though i stopped the application using shudtdown.sh script and then started with startup.sh
Output on screen
Using CATALINA_BASE: /home/dhis/tomcat-dhis
Using CATALINA_HOME: /usr/share/tomcat9
Using CATALINA_TMPDIR: /home/dhis/tomcat-dhis/temp
Using JRE_HOME: /usr/lib/jvm/java-11-openjdk-amd64/
Using CLASSPATH: /usr/share/tomcat9/bin/bootstrap.jar:/usr/share/tomcat9/bin/tomcat-juli.jar
I am NOT attaching the catalina.out file as i am not getting permission to upload being a new user