#P1001: Can't reach database server at `roundhouse.proxy.rlwy.net` on NextJS project with Prisma. :(

77 messages · Page 1 of 1 (latest)

winged tangle
#

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?

vagrant tulipBOT
#

Project ID: 96549d87-13c5-443f-8c9f-56a551999f59

winged tangle
#

project id: 96549d87-13c5-443f-8c9f-56a551999f59

blissful grotto
#

do you get this error when developing locally or when deployed to railway?

winged tangle
#

this is locally

blissful grotto
#

are you sure you are using all the correct environment variables?

winged tangle
#

I believe this the only env variable I need?

#

or is that not the case?

#

thanks for the quick reply Brody!

blissful grotto
#

yep the database url contains all the connection details you'd need

#

would you be happen to be on school / business / public / etc internet? maybe you're behind a restrictive firewall?

winged tangle
#

ooh. let me test that!

#

would the firewall be controlled by the owner of the internet?

blissful grotto
#

it would be controlled by the networking administrator

#

do you have a VPN service you could temporarily connect to then try having your app connect to the database

winged tangle
#

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

#

but it doesn't seem to fix it

#

is there a terminal command I can run to test the connection?

blissful grotto
#

nc -zv <HOSTNAME> <PORT>

winged tangle
#

to the railway service , to clarify

blissful grotto
#

your connection issues are happening locally, you would want to run that command locally

winged tangle
#

Connection to localhost port 3000 [tcp/hbci] succeeded!

#

is what I got

blissful grotto
#

the database on railway is most certainly not exposed on your localhost

winged tangle
#

what does that mean? and how would I fix that?

blissful grotto
#

use the public hostname and port of the database

winged tangle
#

you mean this one?

blissful grotto
#

correct

winged tangle
#

still getting the same error . I changed this part in my env file

blissful grotto
winged tangle
blissful grotto
#

is the database running?

winged tangle
#

I think this means its running?

blissful grotto
#

check it's logs

winged tangle
#

i think its ready to accept connections

blissful grotto
#

I'm thinking this is still a networking issue on your end

#

there are plenty of free VPNs you can download to temporarily try

winged tangle
#

any suggestions?

blissful grotto
#

for free VPNs, no I don't unfortunately

winged tangle
#

thanks the help till now though. I really appreciate it

#

im going to try nordVPN for 30 days

blissful grotto
#

sounds fine to me

winged tangle
#

timed out again

blissful grotto
#

redeploy the database

winged tangle
#

Got same error

#

Timed out

blissful grotto
#

is there any data in the database right now?

winged tangle
#

No

#

It’s a totally new one

blissful grotto
#

then would you mind sending the URL?

winged tangle
blissful grotto
#

I'm talking about the database url

winged tangle
blissful grotto
#

why is the port different than what you showed earlier?

winged tangle
#

i though you said I needed to change

blissful grotto
#

when did i say that?

blissful grotto
winged tangle
#

is my prisma broken them you think?

blissful grotto
#

nc doesnt work either

winged tangle
blissful grotto
#

yes it does

#

are you on the vpn?

winged tangle
#

Yes

blissful grotto
#

ncat also works fine (windows alterative for nc)

#

this isnt a platform issue

winged tangle
#

Ok . Maybe prisma is not handling things nicely

blissful grotto
#

nc does not work for you either, remember?

winged tangle
#

Right

blissful grotto
#

do you have a local firewall on your computer?

winged tangle
#

Checking now

#

Hmm, can’t find it, but as it is a company computer I wouldn’t be too surprised that there is one

#

Tried ncat on my other comp and it work

#

So it’s probably a local computer thing

blissful grotto
#

awesome, problem solved