4 months ago
Hi! I have been having trouble trying to get my Node.js trying to connect to Supabase PostgresQL whilst deployed on Railway. These are the errors I'm getting in my deploy log.
Error connecting to database: Error: connect ENETUNREACH 2a05:d016:571:a402:c2bd:d4fa:5bd0:9c23:5432 - Local (:::0) at internalConnect (node:net:1100:16) at defaultTriggerAsyncIdScope (node:internal/async_hooks:462:18) at GetAddrInfoReqWrap.emitLookup [as callback] (node:net:1381:9) at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:8)
And this is the connection code
const client = new Client({ connectionString: process.env.DATABASE_URL, ssl: { rejectUnauthorized: false } });
I am not a programmer, so I have been relying on Claude.ai which is saying that its trying to connect via IPv6 but that Railway doesnt support that. I have been searching for Supabase and IPv6 in here, but cant understand many of the terms used. If anyone has any experience with Supabase and Railway, I would quite like some help. Thanks for any help. Just ask if you need any more info
14 Replies
4 months ago
Are you using any templates?
Nope, I deployed a custom Node.js/Express app from my own GitHub repository. I connected the repo to Railway and it deploys automatically. Not using any Railway templates
4 months ago
Can you share the variables you have set on Supabase related to binding? (port, host, etc)
I'm not setting any separate host, port, user, or password, just the full DATABASE_URL string from Supabase
DATABASE_URL: postgresql://postgres:[password]@db.gvzvgjehxucjkcqygegw.supabase.co:5432/postgres
API-KEY: Key for an api obvs
4 months ago
Ah. Can you try using the local address? What's the name of the Supabase service?
4 months ago
i got the exact same error since around 24 hours now
4 months ago
i feel like this is also related
4 months ago
4 months ago
4 months ago
@Brody i feel like something changed in the infra last 24h thats break connections with outside providers like supabase, mongodb atlas, etc
4 months ago
We still don't support outbound IPv6
4 months ago
So what does it means ? Like i feel like we didnt changed anything but now lot of peoples are getting 502 for almost the same reason
4 months ago
502s are application level issues, that happens when your application fails to respond to the proxied request.