I’m trying to run N8N with a postgres DB hosted in GCP Cloud SQL. Doing so requires using Cloud SQL Auth Proxy which I have setup accordingly. I can connect to the DB using Datagrip and ./pg_isready -h localhost -d n8n -p 5432 -U postgres returns no errors.
However when running npx n8n locally with the following envs (password removed)
Thanks, that worked perfectly once I removed DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED env variable!
I can now run n8n locally connected to my CloudSQL in GCP.
My next problem I have is the same env settings doesn’t work in Google Cloud Run which should work exactly the same with the Cloud SQL proxy
2024-10-18 12:34:36.109 PDT
Initializing n8n process
2024-10-18 12:34:37.013 PDT
Error: There was an error initializing DB
2024-10-18 12:34:38.137 PDT
Error: connect ECONNREFUSED 127.0.0.1:5432