PostgREST / postgrest

REST API for any Postgres database
https://postgrest.org
MIT License
23.49k stars 1.03k forks source link

Could not look up local user ID in Openshift/Okd environment #2635

Closed gsdiniz closed 1 year ago

gsdiniz commented 1 year ago

I'm trying to use postgrest in a openshift installation.

Postgres' pod is already set but postgrest's pod always fails in connect.

The PGRST_DB_URI value is postgres://<<USER>:<<PASSWORD>>@postgres-svc.app.svc.local/lowcode And the error message is

26/Jan/2023:18:54:59 +0000: {"code":"PGRST000","details":"could not look up local user ID 1002610000: No such file or directory\n","hint":null,"message":"Database connection error. Retrying the connection."}
26/Jan/2023:18:54:59 +0000: Attempting to reconnect to the database in 32 seconds..
laurenceisla commented 1 year ago

According to this https://github.com/PostgREST/postgrest/issues/1921#issuecomment-903083220, maybe there is an error with the user name not being detected by libpq. Does it work using this format?

PGRST_DB_URI="host=postgres-svc.app.svc.local port=5432 user=<<USER>> password=<<PASSWORD>> dbname=lowcode"