Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auditor client not conencting to DB due to "pool timeout" #1110

Open
thdesy opened this issue Jan 20, 2025 · 0 comments
Open

auditor client not conencting to DB due to "pool timeout" #1110

thdesy opened this issue Jan 20, 2025 · 0 comments

Comments

@thdesy
Copy link

thdesy commented Jan 20, 2025

Hi all,

I am trying to run AUDITOR 0.5.0 and 0.6.3, respectively, with podman as container runtime and the Postgres DB in a remote, centrally managed K8s deployment. However, the auditor client can apparently not connect to the DB, while the native postgres client has no issues with the same connection paramaters.

From the vanilla user context, I can connect to the remote DB without issues [1].

Similarly, from an extended container image instance including the postgres client, I can connect to the remote database [2] using the environment variables as exported into the container context.

However, auditor as well as the migration are both failing as entry points - both as native entry points as well as running a shell entry and tracing the migration by hand [3]/

Cheers,
Thomas

[1]

[auditor@grid-preprod-auditor01 ~]$ psql -h ${DB_HOST} -p ${DB_PORT} --username=${DB_USER} --dbname=${DB_NAME}
Password for user tjvzkz_rw: 
psql (13.18, server 15.10 (Ubuntu 15.10-1.pgdg22.04+1))
WARNING: psql major version 13, server major version 15.
         Some psql features might not work.
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.

tjvzkz_preprod=> 
[auditor@grid-preprod-auditor01 ~]$ psql --version
psql (PostgreSQL) 13.18

[2]

FROM ghcr.io/alu-schumacher/auditor:0.6.3

RUN apt update
# RUN apt --yes upgrade
RUN apt-get --yes install telnet postgresql-client
root@554a55efb24b:/auditor# env
AUDITOR_DATABASE__PORT=5432
AUDITOR_DATABASE__PASSWORD=VERYSECRET
AUDITOR_DATABASE__HOST=dads-tjvzkz.desy.de
AUDITOR_DATABASE__USERNAME=tjvzkz_rw
PWD=/auditor
container=podman
HOME=/root
AUDITOR_DATABASE__DATABASE_NAME=tjvzkz_preprod
TERM=xterm
SHLVL=1
AUDITOR_ENVIRONMENT=production
AUDITOR_LOG_LEVEL=debug
AUDITOR_APPLICATION__PORT=8000
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
AUDITOR_APPLICATION__ADDR=0.0.0.0
_=/usr/bin/env
root@554a55efb24b:/auditor# psql -h ${AUDITOR_DATABASE__HOST} -p ${AUDITOR_DATABASE__PORT} --username=${AUDITOR_DATABASE__USERNAME} --dbname=${AUDITOR_DATABASE__DATABASE_NAME}
Password for user tjvzkz_rw: 
psql (15.10 (Debian 15.10-0+deb12u1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.

tjvzkz_preprod=>
root@554a55efb24b:/auditor# psql postgres://tjvzkz_rw:[email protected]:5432/tjvzkz_preprod
psql (15.10 (Debian 15.10-0+deb12u1))
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, compression: off)
Type "help" for help.

tjvzkz_preprod=> 
\q
root@554a55efb24b::/auditor# psql --version
psql (PostgreSQL) 15.10 (Debian 15.10-0+deb12u1)

[3]

root@2490a1cecdd5:/auditor# env
HOSTNAME=2490a1cecdd5
AUDITOR_DATABASE__PORT=5432
AUDITOR_DATABASE__PASSWORD=VERYSECRET
AUDITOR_DATABASE__HOST=dads-tjvzkz.desy.de
AUDITOR_DATABASE__USERNAME=tjvzkz_rw
PWD=/auditor
container=podman
HOME=/root
AUDITOR_DATABASE__DATABASE_NAME=tjvzkz_preprod
TERM=xterm
SHLVL=1
AUDITOR_ENVIRONMENT=production
AUDITOR_LOG_LEVEL=debug
AUDITOR_APPLICATION__PORT=8000
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
AUDITOR_APPLICATION__ADDR=0.0.0.0
_=/usr/bin/env
root@2490a1cecdd5:/auditor# /auditor/entrypoint.sh  migrate
error: error returned from database: pg_hba.conf rejects connection for host "131.169.72.29", user "tjvzkz_rw", database "postgres", SSL encryption
root@2490a1cecdd5:/auditor# md5sum /auditor/auditor          
3159a128c60d34128edbdc30000449b1  /auditor/auditor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant