a year ago
Hello, I am having trouble connecting to the Postgres database and Redis from my localhost. This problem started today. Could you help me understand what is happening?
We have reviewed the environment variables, and they are all correct.
Postgres error:
Can't reach database server at monorail.proxy.rlwy.net:48066
Please make sure your database server is running at monorail.proxy.rlwy.net:48066
Redis error:
Redis Error: connect EBADF 35.212.103.87:39381
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1606:16) {
errno: -9,
code: 'EBADF',
syscall: 'connect',
address: '35.212.103.87',
port: 39381
}
14 Replies
a year ago
Yes
a year ago
Can your application deployed to Railway connect to the database?
Are you perhaps behind some firewall at a workplace or school?
a year ago
I am not behind any firewall. We tested on two different computers and two different internet connections, but it still does not connect. The deployed application to Railway is connected to the database.
a year ago
Hi, I'm looking into your connectivity issues. If you're able to not delete anything that would help to understand what's wrong.
I will let you know once I am done so you can delete things if you need.
a year ago
Ok, if you need to delete the route you can. I've confirmed that our control plane and proxies have the correct routing information that you're using.
Is this issue still on going where your application cannot connect over those 2 proxy routes you're using for redis and postgres ?
a year ago
Yes, it is still happening, but only on localhost. Should I delete the proxy routes?
a year ago
So your application running on Railway using the same url and port does connect ?
a year ago
Yes
a year ago
I deleted the proxy associated with Redis and generated a new one, but the error still persists.
a year ago
No problem, São Paulo, Brazil
a year ago
Sorry for the inconvenience but this has now been fixed and no action would be needed on your end, however we highly recommend having your app connect to the database via the private network by utilizing the URL variables that are marked as private.
5 months ago
To connect from places outside railway you need to get the database public networking credentials.
Go to your database service in Railway control panel (exemple Postgres) -> Settings -> Search for "Networking/Public Networking" then you will se an url like abcdefg.proxy.rlwy.net:48603.
Here you have the DATABASE_HOST and the DATABASE_PORT to connect with.
The DATABASE_PASSWORD, DATABASE_USERNAME, etc, keep the same.
You can also generate new domains.
Hope it help someone, i was having the same dificult
Status changed to Solved brody • 5 months ago