Statlook server cannot connect with PostgreSQL

If during launching the server there appears an error:  “brak wpisu w pg_hba.cong dla hosta “xxx.xxx.xxx.xxx”, użytkownika “postgres” bazy “postgres” SSL wyłączone”, you need to change engine configuration on database server – to force it to accept connections from other computers. błąd połączenia z postgre SQL

Solution: 

    1. On a computer with installed PostgreSQL find Data subfolder in PostgreSQL install folder. By default, you may find them there:
      • Microsoft Windows 32 bit:
        C:\Program Files (x86)\PostgreSQL\x.x\data
      • Microsoft Windows 64 bit:
        C:\Program Files\PostgreSQL\x.x\data

        where x.x is a version number.

    2. Make a backup of pg_hba.conf file
    3. Open pg_hba.conf file in Notepad or other text editor
    4. At the end of the file, in # IPv4 local connections section add the entry:
      host    NameOfYourDatabase      postgres            IPAddress/Mask            md5

      An example of the entry which will allow to connect to Uplook_base database for postgres user from 10.2.234.12 address:

      host    Uplook_base            postgres            10.2.234.12/32            md5
    5. Each element [user, database, IP address/mask] might be replaced by ‘ALL’.

Save the configuration and launch PostgreSQL again..



Was this article helpful?

Related Articles