Downloaded war file before stopping instance, now it doesn't start

Hello All,

I faced a challenge I was upgrading the DHIS2 version from 2.38. to 2.40. and it happened I mistakenly downloaded the war file before stopping the DHIS2 Instance now it can start up. What can i do to get DHIS2 running again?

Hi @Gustarv ,

I am sure which of the war files you downloaded. You mention that you’re upgrading from 2.38 to 2.40, so do you mean you downloaded the v2.40 from releases or you mean you downloaded 2.38 from your working server?
Also, can you please be more descriptive of what kind of dhis2 installation you’re running on your server?

1 Like

hi @Quoda
I was upgrading from 2.38 to 2.40 so I downloaded the war file for 2.40 from the relases. To explain a bit the installation that I was doing was upgrading in ubuntu 22.04 LTS environment and following the instructions was supposed to download the war file to the same location i.e. /home/dhis/tomcat/webapps/ my problem is that I downloaded the war file for v2.40 before stopping the tomcat and ence the instance was confused which war file to run with even after deleting the downloaded war file still the problem persists.

From my experience, you do not need to delete the previous war file. When I move it to tomcat-dhis/webapps/ROOT.war and then start tomcat again, one of the log messages says another war file was found, and it would be deleted and it deletes the old version.

Have you tried reinstalling 2.38 then running tomcat with that to ensure the download process goes fine.

Once that happens, you can stop tomcat, download and replace 2.40 and then start tomcat and see whether the process will finish successfully.

For some reason when I make a mistake with upgrading and the upgrade hasn’t successfully completed, this works

I’ know it’s perhaps too late but you might be interested in a few articles about “server” management

I generally advise to test these upgrades on separate infrastructure (I usually do that for major upgrades, but lately we had several issues with minor upgrades too, I’m pushing for that too)

So making a backup of the db and the war file before proceeding is the minimum before launching an upgrade.

For your problem, tomcat can be in to an unknown state

1 Like