3 years ago
Hi all, I'm trying to build a simple table and create a model called "Lead" so I can store interested users. But when I npx prisma db push, i get the error in the title. Is there a setting on railway im missing?
75 Replies
3 years ago
do you get this error when developing locally or when deployed to railway?
3 years ago
are you sure you are using all the correct environment variables?
3 years ago
yep the database url contains all the connection details you'd need
3 years ago
would you be happen to be on school / business / public / etc internet? maybe you're behind a restrictive firewall?
3 years ago
it would be controlled by the networking administrator
3 years ago
do you have a VPN service you could temporarily connect to then try having your app connect to the database
i dont have a personal VPN, and im at an airbnb so IDK if they would have a strong firewall. I disconnected from my company provided VPN
3 years ago
nc -zv
3 years ago
your connection issues are happening locally, you would want to run that command locally
3 years ago
the database on railway is most certainly not exposed on your localhost
3 years ago
use the public hostname and port of the database
you mean this one?
3 years ago
correct
still getting the same error . I changed this part in my env file
3 years ago
please try this command
I am trying "nc -zv roundhouse.proxy.rlwy.net 20223" in my terminal and its hanging for 30 sec or more. doesnt seem normal
nc: connectx to roundhouse.proxy.rlwy.net port 20223 (tcp) failed: Operation timed out
3 years ago
is the database running?
I think this means its running?
3 years ago
check it's logs
i think its ready to accept connections
3 years ago
I'm thinking this is still a networking issue on your end
3 years ago
there are plenty of free VPNs you can download to temporarily try
3 years ago
for free VPNs, no I don't unfortunately
3 years ago
sounds fine to me
3 years ago
redeploy the database
3 years ago
is there any data in the database right now?
3 years ago
then would you mind sending the URL?
3 years ago
I'm talking about the database url
postgresql://postgres:[email protected]:59178/railway
3 years ago
why is the port different than what you showed earlier?
i though you said I needed to change
3 years ago
when did i say that?
3 years ago
i can connect just fine
3 years ago
3 years ago
nc doesnt work either
3 years ago
yes it does
3 years ago
are you on the vpn?
3 years ago
ncat also works fine (windows alterative for nc)
3 years ago
this isnt a platform issue
3 years ago
nc does not work for you either, remember?
3 years ago
do you have a local firewall on your computer?
Hmm, can’t find it, but as it is a company computer I wouldn’t be too surprised that there is one
3 years ago
awesome, problem solved