This is a template you must use to report issues.
You can also drag images, videos and includePreformatted text
.
Feature(s) impacted
i can’t create a connection with postgresSQL 12 running inside a docker in a Ubuntu 16.04 server
I’m using the adapted command
docker run --rm --init -it -v `pwd`:/usr/src/app -v ~/.forest.d:/usr/src/cli/.forest.d -e TOKEN_PATH="/usr/src/cli" forestadmin/toolbelt projects:create "LPI-001" --databaseConnectionURL "postgres://postgres:xxxxx@127.0.0.1:5432/postgres" --databaseSchema "public" --applicationHost "127.0.0.1" --applicationPort "3310"
√ Creating your project on Forest Admin
× Cannot connect to the database due to the following error:
× {"name":"SequelizeConnectionRefusedError","parent":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":5432},"original":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":5432}}
Observed behavior
I can’t connect to the postgres database the connection string is correct, i’m able to connect with a psql client locally and remotely, the following command return ok
pg_isready -d "postgres://postgres:xxxxxx@127.0.0.1:5432/postgres"
127.0.0.1:5432 - accepting connections
Expected behavior
i expect the connection to the DB to be ok
Failure Logs
√ Creating your project on Forest Admin
× Cannot connect to the database due to the following error:
× {"name":"SequelizeConnectionRefusedError","parent":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":5432},"original":{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":5432}}
Context
Please provide in this mandatory section, the relevant information about your configuration:
- Project name: LPI
- Team name: LPI
- Environment name: ubuntu 16.04
- Agent type & version: ?
- Recent changes made on your end if any: remove the host.docker.internal to 127.0.0.1
docker-compose to start postgres:
version: "2"
services:
postgres:
image: postgres:12-alpine
restart: "always"
ports:
- "127.0.0.1:5432:5432"
volumes:
- /root/LPI-001/data/db:/var/lib/postgresql:cached
- /root/LPI-001:/home/docker:delegated
- /root/LPI-001/docker/.pgpass:/root/.pgpass:ro
environment:
- POSTGRES_USER:postgres
- POSTGRES_PASSWORD=xxxxxx
networks:
- "forest"
networks:
forest:
driver: bridge