Hi!
I’m currently running n8n behind a reverse proxy (Traefik) within a Scaleway VPC.
I have another server running baserow within the VPC that is able to send out emails fine via smtp (I’ve already set Scaleway up to allow smtp ports) I’ve also tested the credential in console using telnet and it works fine.
I’ve spent a lot of time troubleshooting and cannot seem to figure out the cause but it seems to be with n8n, I spun up a new n8n instance within the environment and got the same issue with the smtp node.
I am running in queue mode with 2 workers and 2 webhook processors but the docs mentioned nothing special about if you are using n8n scaling.
Describe the issue/error/question
Whenever I try to add a user or execute the email node I get a generic cannot send email error
What is the error message (if any)?
I’ve seen 2 differect errors when inviting a user:
0|n8n | ERROR RESPONSE
0|n8n | ResponseError: Failed to send email to [email protected]
0|n8n | at /home/n8n/.nodejs_global/lib/node_modules/n8n/dist/src/UserManagement/routes/users.js:320:19
0|n8n | at processTicksAndRejections (internal/process/task_queues.js:95:5)
0|n8n | at async /home/n8n/.nodejs_global/lib/node_modules/n8n/dist/src/ResponseHelper.js:91:26 {
0|n8n | httpStatusCode: 500
0|n8n | }
0|n8n | ERROR RESPONSE
0|n8n | ResponseError: There is a problem with your SMTP setup! Connection timeout
0|n8n | at /home/n8n/.nodejs_global/lib/node_modules/n8n/dist/src/UserManagement/routes/users.js:28:23
0|n8n | at processTicksAndRejections (internal/process/task_queues.js:95:5)
0|n8n | at async /home/n8n/.nodejs_global/lib/node_modules/n8n/dist/src/ResponseHelper.js:91:26 {
0|n8n | httpStatusCode: 500
0|n8n | }
And one when using the email node:
0|n8n | ERROR RESPONSE
0|n8n | ResponseError: Connection timeout
0|n8n | at /home/n8n/.nodejs_global/lib/node_modules/n8n/dist/src/UserManagement/routes/users.js:302:23
0|n8n | at processTicksAndRejections (internal/process/task_queues.js:95:5)
0|n8n | at async /home/n8n/.nodejs_global/lib/node_modules/n8n/dist/src/ResponseHelper.js:91:26 {
0|n8n | httpStatusCode: 500
0|n8n | }
My env variables on the UI instance:
WEBHOOK_URL: "https://n8n.domain.com",
N8N_HOST:"n8n.internal.ip",
N8N_PORT:"5678",
N8N_PROTOCOL:"https",
N8N_EDITOR_BASE_URL:"https://n8n.domain.com",
N8N_LISTEN_ADDRESS: "0.0.0.0",
N8N_ENDPOINT_WEBHOOK: "api",
N8N_ENDPOINT_WEBHOOK_TEST: "api-test",
N8N_ENDPOINT_WEBHOOK_WAIT: "api-wait",
N8N_METRICS:true,
N8N_PAYLOAD_SIZE_MAX:32,
DB_TYPE:"postgresdb",
DB_POSTGRESDB_DATABASE:"database",
DB_POSTGRESDB_HOST:"x.x.x.x",
DB_POSTGRESDB_PORT:"port",
DB_POSTGRESDB_USER:"username",
DB_POSTGRESDB_PASSWORD:"password",
NODE_FUNCTION_ALLOW_EXTERNAL:"uuid",
QUEUE_BULL_REDIS_HOST:"x.x.x.x",
QUEUE_BULL_REDIS_PORT:"port",
QUEUE_BULL_REDIS_PASSWORD:"password",
EXECUTIONS_MODE:"queue",
N8N_DISABLE_PRODUCTION_MAIN_PROCESS:"true",
N8N_SKIP_WEBHOOK_DEREGISTRATION_SHUTDOWN:"true",
N8N_EMAIL_MODE:"smtp",
N8N_SMTP_HOST:"smtp.gmail.com",
N8N_SMTP_USER:"[email protected]",
N8N_SMTP_PASS:"password",
N8N_SMTP_SENDER:"[email protected]"
Information on your n8n setup
- n8n version:0.169.0
- Database you’re using : PostgreSQL
- Running n8n with the execution process [own(default), main]:queue
- Running n8n via [Docker, npm, n8n.cloud, desktop app]:npm