DHIS2 Version 2.36 Installation in DIgital Ocean and locally in UBUNTU 18.04

Hello Everyone i am currently facing the 404 error on installation of dhis2 version 2.36 in ubuntu 18.04 in both locally and in digital ocean server below i have attached both the errors and the logs for assistance thank you



ps: The documentation which i have followed upon installing is DHIS2 Installation on Ubuntu 20.04 LTS – Digital Ocean – DHIS2 Web Portal

While we get support from an expert, would you like to check out and review the official dhis2 documentation? Installation - DHIS2 Documentation

Please check if you have followed these instructions or if there are contradictions because you are trying to install the latest DHIS2 2.36 version I recommend you follow the latest docs. Thank you!

2 Likes

Thanks @Gassim but upon checking the documentation i see i have followed all the steps as documented in the documentation thanks for your response

1 Like

@Kibahila Are you starting tomat with the dhis user you created? The log complains that you don’t have access to the /home/dhis/config folder, which should be owned by that user, according to the external guide you followed, so that is the first thing I would check.

2 Likes

@phil Please help, Im am facing a 404 error after following the steps for installation

Hi @Siboniso_Sibandze

If you provide some information about the version you are running, which installation steps you followed, and what is shown in the logs at startup (catalina.out if using tomcat) then the community here may be able to provide some assistance.

Kind regards,
Phil

1 Like

27-Jul-2021 22:33:53.830 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:754)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1852)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: Properties could not be loaded
at org.hisp.dhis.external.conf.DefaultDhisConfigurationProvider.loadDhisConf(DefaultDhisConfigurationProvider.java:320)
at org.hisp.dhis.external.conf.DefaultDhisConfigurationProvider.init(DefaultDhisConfigurationProvider.java:95)
at org.hisp.dhis.configuration.SecureCookieConfiguration.getConfig(SecureCookieConfiguration.java:75)
at org.hisp.dhis.configuration.SecureCookieConfiguration.onStartup(SecureCookieConfiguration.java:56)
at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:169)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5225)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
… 10 more
Caused by: org.hisp.dhis.external.location.LocationManagerException: External directory not set
at org.hisp.dhis.external.location.DefaultLocationManager.buildDirectory(DefaultLocationManager.java:248)
at org.hisp.dhis.external.location.DefaultLocationManager.getFileForReading(DefaultLocationManager.java:174)
at org.hisp.dhis.external.location.DefaultLocationManager.getInputStream(DefaultLocationManager.java:145)
at org.hisp.dhis.external.location.DefaultLocationManager.getInputStream(DefaultLocationManager.java:138)
at org.hisp.dhis.external.conf.DefaultDhisConfigurationProvider.loadDhisConf(DefaultDhisConfigurationProvider.java:309)
… 16 more

27-Jul-2021 22:33:53.833 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/home/dhis/tomcat-dhis/webapps/ROOT.war]
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:980)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1852)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

27-Jul-2021 22:33:53.834 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive [/home/dhis/tomcat-dhis/webapps/ROOT.war] has finished in [9,588] ms
27-Jul-2021 22:33:53.845 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler [“http-nio-8080”]
27-Jul-2021 22:33:53.855 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 9688 ms
27-Jul-2021 22:34:32.842 INFO [http-nio-8080-exec-2] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
Note: further occurrences of HTTP header parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in method name. HTTP method names must be tokens
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:428)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:684)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:806)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1498)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)

here is the logs, Please assist I am new in this. I read the documentation. I do not know what I did wrong

1 Like

@Siboniso_Sibandze It is difficult to help if you don’t provide information about what version of DHIS2 you are trying to run and what installation steps you have followed.

1 Like

I followed this guide
dhis2-docs-lab/installation.md at master · dhis2/dhis2-docs-lab (github.com)

As is, I only changed password

dhis2.org/2.31

That’s not really a valid link for the documentation (in fact that repository should be removed). Here is the official up-to-date document: Installation - DHIS2 Documentation

1 Like

Is there a particular reason you are installing 2.31? It should work, of course, but that version is no longer supported. Current supported versions are 2.34 - 2.36.

1 Like

No particular reason.

Then I would suggest you try the most recent (https://releases.dhis2.org/2.36/dhis2-stable-2.36.3.war) as it will be supported for the longest.

What versions of Java and Tomcat are you using? We use JDK 8 and Tomcat 8.5.50 on play.dhis2.org for example. I think some people have had problems with some versions of Tomcat 9, but I’m not sure if I remember correctly.

1 Like

I am trying the new installation guide you gave. I seem to be facing erros

root@likhwa-esdhis:~# sudo -u postgres createuser -SDRP dhis
sudo: unknown user: postgres
sudo: unable to initialize policy plugin
root@likhwa-esdhis:~#

root@likhwa-esdhis:~# sudo apt-get install postgresql-12 postgresql-12-postgis-3
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package postgresql-12
E: Unable to locate package postgresql-12-postgis-3

1 Like

You’ll have to find out which PostgreSQL packages are available for the system you are running. You should be able to find that out by searching the web. (We do most of our testing on either PostgreSQL 10 or 13 - 13 has some performance advantages).

1 Like

root@bhaweshvps:/home/dhis# service postgresql status
â—Ź postgresql.service - PostgreSQL RDBMS
Loaded: loaded (/lib/systemd/system/postgresql.service; enabled; vendor preset:
Active: active (exited) since Wed 2021-07-28 08:54:55 SAST; 24min ago
Process: 11689 ExecStart=/bin/true (code=exited, status=0/SUCCESS)
Main PID: 11689 (code=exited, status=0/SUCCESS)

Jul 28 08:54:55 bhaweshvps systemd[1]: Starting PostgreSQL RDBMS…
Jul 28 08:54:55 bhaweshvps systemd[1]: Started PostgreSQL RDBMS.
lines 1-8/8 (END)

1 Like