← Back to team overview

dhis2-users team mailing list archive

Re: DHIS can't connect to Postgres

 

For windows you have to the following two lines in pg_hba.conf

# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

In the postgresql.conf the following line should be there

listen_addresses = 'localhost'

I presume that tomcat and postgres are on the same computer.

Hope that will help. Also check the white space in the hibernate file as
Bob mentioned.
If not solved send us the tomcat cat log, postgres log, and the .conf files.

Regards


*Muhammad Abdul Hannan Khan*

Senior Technical Advisor – HIS

Priority Area Health

Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH

House10/A, Road 90, Gulshan 2, Dhaka 1212, Bangladesh

* *

*GIZ-DGHS*

Room # 304, Shahid Dr. Milon Bhaban

Director General of Health Service of MoHFW

Mohakhali, Dhaka



T +880-2- 8816459, 8816412 ext 118

M+88 01819 239 241

M+88 01534 312 066

F +880-2-8813875

E hannan.khan@xxxxxx

S hannan.khan.dhaka



On Fri, Jul 26, 2013 at 4:12 PM, Morten Olav Hansen <mortenoh@xxxxxxxxx>wrote:

> Did you switch to using md5 auth in pg_hba.conf?
>
> local   all             all                                     md5
>
> Not sure what's the default on windows, but on Ubuntu you always have to
> do that..
>
> --
> Morten
>
>
> On Fri, Jul 26, 2013 at 5:09 PM, Friedman, Roger (CDC/CGH/DGHA) (CTR) <
> rdf4@xxxxxxx> wrote:
>
>>   We have a new 64-bit installation: Windows, Tomcat7, Postgres9.2.
>> hibernate.properties like manual, connection //localhost:8080/dhis.  Tomcat
>> log shows authentication error making connection, and login rejection can
>> be seen in Postgres log.  This happens with 2 different username/password
>> pairs, both of which work when used with pgAdmin.  Any ideas?****
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-users
>> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-users
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

Follow ups

References