#Trouble switching to private networking

15 messages · Page 1 of 1 (latest)

faint fox
#

I have a webserver and a database and I'm trying to connect to the db from the webserver using the PGPRIVATEHOST but it isn't working. Is there something else I need to do other than switch from PGHOST to PGPRIVATEHOST?

void furnaceBOT
#

Project ID: 2e90105f-9e57-4bf0-b0d4-cc830c988fd2

faint fox
#

2e90105f-9e57-4bf0-b0d4-cc830c988fd2

glossy flax
#

you would also need to use the private port

faint fox
#

Where would I find the private port? It's not listed as an env var on the database

glossy flax
#

service settings

faint fox
#

That's for public networking though. I don't see one under Private Networking?

glossy flax
#

5432 is the private port

faint fox
#

Oh weird okay let me give that a go

#

psycopg2.OperationalError: could not translate host name "postgres.railway.internal" to address: Name or service not known Still getting this :/

glossy flax
#

please switch the runtime to v2

#

also, please dont specify install commands in the build command field, it is poor practice

faint fox
#

Oh yeah I had a buddy fix that for me and I forgot to remove it from the build command

#

Alrighty looks like one of those two things fixed it! Thanks for the help 😄

glossy flax
#

no problem!