1) Open cmaster.inc
2) Search the pg_connect function, wich connects to the postgresql database. You'll most probably find 4 of them:
a) One for connecting to Local DB with a password
b) One for connecting to Local DB with no password
c) One for connecting to Remote DB with a password
d) One for connecting to Remote DB with no password
3) All of them have an at symbol (@) as a prefix of the function. That instructs PHP to hide any errors/messages returned by that function. Remove the at symbol of proper remote DB pg_connect (it will depends if you use or not a password for connecting (I mean, not using a password is the same as leaving it blank in the conf)
4) Save cmaster.inc. Reload the page. You must be able to see Why it's failing to connect. Then, fix it!
5) Put the at symbol back. Save.