8gears / n8n-helm-chart

A Kubernetes Helm chart for n8n a Workflow Automation Tool. Easily automate tasks across different services.
https://artifacthub.io/packages/helm/open-8gears/n8n
Apache License 2.0
187 stars 97 forks source link

Unable to connect AWS Postgress to n8n #43

Closed gthomson31 closed 1 year ago

gthomson31 commented 1 year ago

Describe the problem/error/question Looking to deploy n8n on Internal Kubernetes environment using Helm to simplify the installation.

What is the error message (if any)? I have deployed an external RDS Postgres DB in AWS but am having issues in connecting the n8n application to the service.

This is how the variables have been setup - seems to continue to default to internal DB

database:
 type:             postgresdb
 tablePrefix:      # Prefix for table names - default: ''
 postgresdb:
   database:       # PostgresDB Database - default: n8n
   host:           <AWSHOST ADDRESS>
   password:       <AWSHOST PASSWORD>
   port:            # PostgresDB Port - default: 5432
   user:            <AWSHOST USERNAME>
   schema:            # PostgresDB Schema - default: public
Vad1mo commented 1 year ago

@gthomson31 were you able to solve the issue? can you quickly post a solution if it is n8n chart relevant, so we can close this issue.

gthomson31 commented 1 year ago

No we ended up giving up on self hosting n8n

brokenjacobs commented 8 months ago

For anyone finding this issue. The problem appears to be that n8n requires the postgresql extension uuid-ossp to be installed, but doesn't document this requirement. You will see log entries like this:

STATEMENT:  CREATE EXTENSION IF NOT EXISTS "uuid-ossp"
ERROR:  permission denied for database n8n
Vad1mo commented 8 months ago

That's, strange, we are using n8n with AWS RDS. Also the error message "permission denied for database n8n" says something different.

brokenjacobs commented 8 months ago

We are using cloud sql on gcp, and don’t give db owner by default or super user. N8N tries to create the schema and extension even if they exist, and you get these permission errors. You have to grant create on the db to the n8n user in order for it to successfully start.

If forgot to include the line with HINT about what permission to add to resolve the error (create on db)