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!
@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.
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.
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)
@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.
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
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.
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.
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).