Cawemo On-Premise Installation do not connect to PostgreSQL

I’m following the steps in the documentation On-Premise Installation but when I try to Run Cawemo it can’t connect to the database with the following message:

**Unable to obtain connection from database (jdbc:postgresql://localhost:5432/cawemo?) for user 'cawemo': Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.**

I’m using PostgreSQL 9.6.17 that I already use as the Camunda BPM database running normally on this same database server.

The environment variables are:

DB_HOST=localhost
DB_NAME=cawemo
DB_PASSWORD=cawemo
DB_PORT=5432
DB_USER=cawemo

The same of PostgreSQL environment variables:
PGDATABASE=cawemo
PGPASSWORD=cawemo
PGPORT=5432
PGUSER=cawemo

The connection test works:
$ psql
psql (9.6.17)
Type “help” for help.
cawemo=# \dt
No relations found.
cawemo=# \q

Any help is appreciated.

Hi @mbitencourt,

DB_HOST=localhost is not going to work as localhost refers to the docker container, which does not contain a database.

Best regards
Cornelius

2 Likes

Hi @csuermann,
Perfect! I changed to the IP address of my notebook where PostgreSQL is installed and the tables were created.
Thank you.