Server crash

Hello
I need your help, my server is responding HTTP Status 404 - Not Found this morning

I used for the installation of dhis2tools next generation
please

LOG

Oct 15 06:25:09 hmis tomcat9[277]: at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1138)
Oct 15 06:25:09 hmis tomcat9[277]: at com.mchange.v2.resourcepool.BasicResourcePool.doAcquireAndDecrementPendingAcquiresWithinLockOnSuccess(BasicResourcePool.java:1125)
Oct 15 06:25:09 hmis tomcat9[277]: at com.mchange.v2.resourcepool.BasicResourcePool.access$700(BasicResourcePool.java:44)
Oct 15 06:25:09 hmis tomcat9[277]: at com.mchange.v2.resourcepool.BasicResourcePool$ScatteredAcquireTask.run(BasicResourcePool.java:1870)
Oct 15 06:25:09 hmis tomcat9[277]: at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:696)
Oct 15 06:25:09 hmis tomcat9[277]: ConnectException occurred while connecting to postgres:5432
Oct 15 06:25:09 hmis tomcat9[277]: java.net.ConnectException: Connection refused (Connection refused)
Oct 15 06:25:09 hmis tomcat9[277]: at java.net.PlainSocketImpl.socketConnect(Native Method)

Hi Daniel,

It appears tour dhis2 instance has not been allowed to connect to the postgres engine. Make sure your connection details in the dhis.conf are configured correctly like so:
connection.url = jdbc:postgresql://db_serv_ip:port/db-name
connection.username = xxxxxx
connection.password = xxxxxx

Additionally, check your pg_hba.conf is configured to allow your web server host onto the database. Let me know how it goes.

I am basing my assumptions on the error below:
Oct 15 06:25:09 hmis tomcat9[277]: java.net.ConnectException: Connection refused (Connection refused)

1 Like

Hi


Processing: dhis2.conf.txt…
Processing: log.txt…
Processing: pg_hba.conf.txt…

here is my current configuration I can not find the error
you can help me ?
thank you very much, our server has been crashing for 3 days
a big thank-you!


Daniel it looks from your listing that you only have one dhis2 instance (hmis). Is that correct?

There are a number of extra entries in pg_hba.conf for staging etc, including a very weird one at the end with dhis.war. I dont know if all these other systems exist just that their application containers are not running. But the last line looks dodgy and might be preventing the pg_hba.conf from loading at all.

It might be good to look at your postgresql log file to see if there are any errors relating to that.

If so, I would suggest as a start to remove that line and then ‘service postgresql reload’ then try to start your hmis again. Check for any errors in postgres log.

Meanwhile you have committed the great sin of leaking your database password online :-). You should change that. But before going about changing passwords which might add to the confusion, lets get it up and running first.

1 Like