3 months ago
Hello,
When I redeployed n8n to update it, it crashed with this error :
[Redis client] getaddrinfo
ENOTFOUND redis.railway.internal
Unable to connect to Redis after trying to connect for 10s
Exiting process due to Redis connection error
Could you help me please ?
8 Replies
3 months ago
Hello,
N8N does not support connecting to Redis via the private network due to misconfigurations in the upstream ioredis package that N8N uses internally.
Please undo your modifications and have it connect back over the public network.
Best,
Brody
Status changed to Awaiting User Response railway[bot] • 3 months ago
3 months ago
Thank you for your reply.
I changed all the variables and setting as if it was a new n8n stack (I compared it with a new template I installed). I still have this error...
Status changed to Awaiting Railway Response railway[bot] • 3 months ago
3 months ago
Hello,
You are still having N8N attempt to connect to Redis via the private network, please undo your modifications and have it connect back over the public network.
Status changed to Awaiting User Response railway[bot] • 3 months ago
3 months ago
That's what I've done, I reset the variables to what they were...
Here is the Redis variables :
RAILWAY_RUN_UID="0"
REDIS_PASSWORD="YJu3qSsuBTCFC*GTWvDTyS_gayS2nPn-"
REDIS_PRIVATE_URL="redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST_PRIVATE}}:${{REDISPORT_PRIVATE}}"
REDIS_URL="redis://default:${{REDIS_PASSWORD}}@${{RAILWAY_TCP_PROXY_DOMAIN}}:${{RAILWAY_TCP_PROXY_PORT}}"
REDISHOST="${{RAILWAY_TCP_PROXY_DOMAIN}}"
REDISHOST_PRIVATE="${{RAILWAY_PRIVATE_DOMAIN}}"
REDISPORT="${{RAILWAY_TCP_PROXY_PORT}}"
REDISPORT_PRIVATE="6379"
REDISUSER="default"
And the n8n primary variables :
DB_POSTGRESDB_DATABASE="${{Postgres-n8n.POSTGRES_DB}}"
DB_POSTGRESDB_HOST="${{Postgres-n8n.PGHOST_PRIVATE}}"
DB_POSTGRESDB_PASSWORD="${{Postgres-n8n.POSTGRES_PASSWORD}}"
DB_POSTGRESDB_PORT="${{Postgres-n8n.PGPORT_PRIVATE}}"
DB_POSTGRESDB_USER="${{Postgres-n8n.POSTGRES_USER}}"
DB_TYPE="postgresdb"
ENABLE_ALPINE_PRIVATE_NETWORKING="true"
EXECUTIONS_DATA_MAX_AGE="240"
EXECUTIONS_DATA_PRUNE="true"
EXECUTIONS_DATA_PRUNE_MAX_COUNT="10000"
EXECUTIONS_DATA_SAVE_ON_ERROR="all"
EXECUTIONS_DATA_SAVE_ON_SUCCESS="all"
EXECUTIONS_MODE="queue"
GENERIC_TIMEZONE="Europe/Paris"
N8N_AUTH_EXCLUDE_ENDPOINTS="api"
N8N_EDITOR_BASE_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}"
N8N_ENCRYPTION_KEY="18DD-bRCwKGDsO9qj-xRoeT4Azs8HNGl"
N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS="true"
N8N_LISTEN_ADDRESS="::"
N8N_REINSTALL_MISSING_PACKAGES="true"
PORT="5678"
QUEUE_BULL_REDIS_HOST="${{Redis-n8n.REDISHOST}}"
QUEUE_BULL_REDIS_PASSWORD="${{Redis-n8n.REDIS_PASSWORD}}"
QUEUE_BULL_REDIS_PORT="${{Redis-n8n.REDISPORT}}"
QUEUE_BULL_REDIS_USERNAME="${{Redis-n8n.REDISUSER}}"
WEBHOOK_URL="https://${{RAILWAY_PUBLIC_DOMAIN}}"
Does it look correct to you ?
Status changed to Awaiting Railway Response railway[bot] • 3 months ago
3 months ago
I added a public domain to redis... Guess it works...
3 months ago
Hello,
You had a few misconfigurations, mainly adding that public domain, and having the tcp proxy pointed to the wrong port.
I then did a full redeploy of primary and the worker, looks to be back online.
Please do not modify network settings of templates, they are setup in a very specific way.
Best,
Brody
Status changed to Awaiting User Response railway[bot] • 3 months ago
3 months ago
Thank you so much Brody ! Have a nice day !
Status changed to Awaiting Railway Response railway[bot] • 3 months ago
Status changed to Awaiting User Response railway[bot] • 3 months ago
Status changed to Solved brody • 3 months ago