Cannot launch DHIS2 instance — Tomcat and nginx working

I’m on a Mac and using Terminal to try to set up a DHIS2 instance. I have Tomcat 9 and nginx running and my public IP address (through AWS) is showing that Tomcat is running, but isn’t redirecting to the DHIS2 instance. I’m not sure if this means I haven’t deployed correctly or what. I’d be grateful for any insight.

Hello @Blake_Erhardt
Lets Resolve your issue, sounds very fixable. Please tell me, what kind of installation are you using?

  1. Bobs Ngtools - Mostly apache2
  2. dhis2 ngtools - Asible
  3. Standalone - everything you are installing manually then make them work.
    If standalone, did you follow any specific documentation? if you did please share the link we review it.

Debuging

  1. Verify Tomcat Configuration:
  • Check the Tomcat logs (catalina.out or catalina.log) for any error messages related to the deployment of DHIS2. Look for any exceptions or warnings that might indicate an issue with the deployment.
  • Ensure that the DHIS2 WAR file is correctly deployed in the Tomcat webapps directory. Check that the WAR file name matches the desired context path (e.g., dhis.war for accessing DHIS2 at http://localhost:8080/dhis).
  • Restart Tomcat to ensure that any configuration changes or deployments take effect.
  1. Verify nginx Configuration:
  • Check the nginx configuration file (usually located at /etc/nginx/nginx.conf or in a separate sites-available directory) to ensure that it is correctly configured to forward requests to Tomcat.
  • Verify that the nginx server block or configuration includes a proxy pass directive to forward requests to Tomcat, typically using the proxy_pass directive with the appropriate URL and port (e.g., proxy_pass http://localhost:8080;).
  • Restart nginx to apply any configuration changes.
  1. Check Firewall and Security Group Settings:
  • Ensure that your AWS security group allows inbound traffic on the necessary ports (e.g., port 80 for HTTP or port 443 for HTTPS).
1 Like

Hi Moses,

Thanks for your response. Unfortunately I’m back to square one where even the IP won’t load.

I’ve downloaded the latest WAR file and downloaded and installed JAVA. The instructions I see are telling me to go to the file where I have the extracted directory from the WAR file “dhis2-stable-latest” and run this code: “java -jar dhis2-stable-latest”. I am receiving an error in Terminal “Error: Invalid or corrupt jarfile dhis2-stable-latest”. I downloaded the file from the DHIS2 releases website, so I’m not sure what the issue is.

Thanks for your insight!

Hi @moses_mwale and others, curious if you have thoughts on these issues.

Thank you!

which instructions? share a link please

1 Like