Can't deploy popular n8n template

bonochromaticHOBBY

3 months ago

I'm a Railway noob here, getting started setting up an n8n environment. I used the most popular template here (Jack's) with entirely default configurations, but the template doesn't deploy correctly.

From the logs, it looks like things fall apart right here during the initial deployment:

getaddrinfo ENOTFOUND postgres.railway.internal

I was able to work past this by manually deploying a Postgres database first, then redeploying n8n primary. That gets n8n working, but introduces a new problem: I can't access the Postgres Data UI.

Here's some supplementary information. Could you help me zero in on a cause/fix? Thank you!

Initial Deployment Logs:
-------------------
Mounting volume on: /var/lib/containers/railwayapp/bind-mounts/0db5c023-7ada-43be-83bb-0f93a8adc10d/vol_0osuim9fnqdxlgod

Starting Container

redis 13:43:03.22 INFO ==>

redis 13:43:03.22 INFO ==> Welcome to the Bitnami redis container

redis 13:43:03.23 INFO ==> Subscribe to project updates by watching https://github.com/bitnami/containers

redis 13:43:03.23 INFO ==> Did you know there are enterprise versions of the Bitnami catalog? For enhanced secure software supply chain features, unlimited pulls from Docker, LTS support, or application customization, see Bitnami Premium or Tanzu Application Catalog. See https://www.arrow.com/globalecs/na/vendors/bitnami/ for more information.

redis 13:43:03.24 INFO ==>

redis 13:43:03.25 INFO ==> Starting Redis setup

redis 13:43:03.67 INFO ==> Initializing Redis

redis 13:43:03.72 INFO ==> Setting Redis config file

redis 13:43:03.74 INFO ==> Redis setup finished!

redis 13:43:03.75 INFO ==> Starting Redis

1:C 18 Mar 2025 13:43:03.770 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.

1:C 18 Mar 2025 13:43:03.770 * oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo

1:C 18 Mar 2025 13:43:03.770 * Redis version=7.4.2, bits=64, commit=00000000, modified=1, pid=1, just started

1:C 18 Mar 2025 13:43:03.770 * Configuration loaded

1:M 18 Mar 2025 13:43:03.771 * monotonic clock: POSIX clock_gettime

1:M 18 Mar 2025 13:43:03.772 * Running mode=standalone, port=6379.

1:M 18 Mar 2025 13:43:03.772 * Server initialized

1:M 18 Mar 2025 13:43:03.784 * Creating AOF base file appendonly.aof.1.base.rdb on server start

1:M 18 Mar 2025 13:43:03.787 * Creating AOF incr file appendonly.aof.1.incr.aof on server start

1:M 18 Mar 2025 13:43:03.787 * Ready to accept connections tcp

Starting Container

Initializing n8n process

There was an error initializing DB

getaddrinfo ENOTFOUND postgres.railway.internal

User settings loaded from: /home/node/.n8n/config

Last session crashed

Initializing n8n process

Postgres variables (defaults):
--------------------
DATABASE_PRIVATE_URL="postgres://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{PGHOST_PRIVATE}}:${{PGPORT_PRIVATE}}/${{POSTGRES_DB}}"

DATABASE_URL="postgres://${{POSTGRES_USER}}:${{POSTGRES_PASSWORD}}@${{PGHOST}}:${{PGPORT}}/${{POSTGRES_DB}}"

PGDATA="/var/lib/postgresql/data/pgdata"

PGHOST="${{RAILWAY_TCP_PROXY_DOMAIN}}"

PGHOST_PRIVATE="${{RAILWAY_PRIVATE_DOMAIN}}"

PGPORT="${{RAILWAY_TCP_PROXY_PORT}}"

PGPORT_PRIVATE="5432"

POSTGRES_DB="railway"

POSTGRES_PASSWORD=<REDACTED>

POSTGRES_USER="railway"

SSL_CERT_DAYS="820"

Solved

3 Replies

3 months ago

Hi, can you try redeploying ? It's possible the database was not running yet.


Status changed to Awaiting User Response railway[bot] 3 months ago


bonochromaticHOBBY

3 months ago

Redeploying the database and then subsequently redeploying n8n and the worker did get things up and running. I still couldn't get the Data Tab to work correctly, but I spotted a comment from Jack in the template thread that that's already a known behavior. So I think I'm all set - thank you for the support!


Status changed to Awaiting Railway Response railway[bot] 3 months ago


3 months ago

Getting the data tab working may require enabling public networking via a TCP proxy


Status changed to Awaiting User Response railway[bot] 3 months ago


Status changed to Solved itsrems 3 months ago


Can't deploy popular n8n template - Railway Help Station