New DHIS2 install on UBUNTU 19.10 (Error Starting )

Hi I tried my fist install on ubuntu 19.10 following these instructions from the link below:
http://dhis2trainingland.com/eportal/?tutorial=dhis2-installation-on-ubuntu-19-04-lts-digital-ocean

I started tomcat: using this comand and it started:

t@t-ML10Gen9:~$ cd /home/dhis/
t@t-ML10Gen9:/home/dhis$ sudo -u dhis tomcat-dhis/bin/startup.sh
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-8-openjdk-amd64/
Using CLASSPATH: /usr/share/tomcat9/bin/bootstrap.jar:/usr/share/tomcat9/bin/tomcat-juli.jar
Tomcat started.
Tomcat started
t@t-ML10Gen9:/home/dhis$

and when i tried to run DHIS2 the server did not display anything on the browser.

using the same instruction I am getting error;

my-server ’s server IP address could not be found.
When i run: http://localhost:8080/dhis
I get the error.

HTTP Status 404 – Not Found

Type Status Report

Message Not found

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Anyone to assist?

Could you please run the following command:

tail -f tomcat-dhis/logs/catalina.out

after you startup the instance, and share the output, it may tell you if there was a problem while starting up the tomcat instance and what it is.

better to run it in a different console window and start up the instance in another, so you can see the logs while the instance is starting up

Thanks for the response. I have run the command and its giving me the message below.

t@t-ML10Gen9:~$ cd /home/dhis/
t@t-ML10Gen9:/home/dhis$ sudo -u dhis tomcat-dhis/bin/startup.sh
[sudo] password for t:
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-8-openjdk-amd64/
Using CLASSPATH: /usr/share/tomcat9/bin/bootstrap.jar:/usr/share/tomcat9/bin/tomcat-juli.jar
Tomcat started.
Tomcat started
t@t-ML10Gen9:/home/dhis$ tail -f tomcat-dhis/logs/catalina.out
tail: cannot open ‘tomcat-dhis/logs/catalina.out’ for reading: Permission denied
tail: no files remaining
t@t-ML10Gen9:/home/dhis$

It didn’t run due to the Permission restriction, sorry, could you run it with sudo, like:

sudo tail -f tomcat-dhis/logs/catalina.out

or with user dhis:

sudo -u dhis tail -f tomcat-dhis/logs/catalina.out

so it doesn’t show the Permission denied message and show the log instead

Thanks.

I ran it in sudo and gave the following;

t@t-ML10Gen9:/home/dhis$ sudo tail -f tomcat-dhis/logs/catalina.out
[sudo] password for t:

  • WARN 2020-05-06T17:46:44,978 Having failed to acquire a resource, com.mchange.v2.resourcepool.BasicResourcePool@7f47fd1f is interrupting all Threads waiting on a resource to check out. Will try again in response to new client requests. (Slf4jMLog.java [C3P0PooledConnectionPoolManager[identityToken->z8kfsxa91t40gyr713mni|6fce78e6]-HelperThread-#0])
    <4>The web application [ROOT] appears to have started a thread named [_org.hisp.dhis.cache.LocalCache.INIT-85-w3] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    sun.misc.Unsafe.park(Native Method)
    java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    org.cache2k.core.util.SimpleTimer$TimerThread.mainLoop(SimpleTimer.java:361)
    org.cache2k.core.util.SimpleTimer$TimerThread.run(SimpleTimer.java:337)
    <6>Deployment of web application archive [/home/dhis/tomcat-dhis/webapps/ROOT.war] has finished in [41,501] ms
    <6>Starting ProtocolHandler [“http-nio-8080”]
    <6>Server startup in [41,542] milliseconds

Are you able to tell what is causing the problem from this log?

Sorry I cannot know what the problem is from the info you provided, I think there are more logs info not displayed, you need to run the command in a different window and while the command is running, keep it’s window open, and open another window and shut down the instance and start it up again so the first logs, while the instance is starting up, are displayed. if the problem is due to missing settings I will know.

Looks like you have permission issues, try this to set it correctly

sudo chown -Rv dhis:dhis /home/dhis

This will everything underneath /home/dhis owned and grouped by user dhis
then try sudo -u dhis ./tomcat-dhis/bin/startup.sh again