#Private networking not working

18 messages · Page 1 of 1 (latest)

sonic badge
#

Getting this error while trying to connect via private networking within a project

midnight lindenBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

spiral pantherBOT
#

Project ID: 2504e51b-d885-44bb-8f3f-39a0cca99259

sonic badge
#

2504e51b-d885-44bb-8f3f-39a0cca99259

warped surge
#

does the project you are trying to connect to have App Sleeping enabled?

sonic badge
#

Where can i check that?

warped surge
#

in your service settings
but if you don't know about it then you likely don't have it enabled

sonic badge
#

Can't find any such option in the settings

warped surge
#

Oh yea, it's a beta feature, I forgot
It's not the issue here

sonic badge
#

How can i fix the issue?

#

I am using python's fastAPI for the API and running via uvicorn.
uvicorn api:app --host 0.0.0.0 --port ${PORT}
The public endpoint seems to be working fine but private doesn't

warped surge
#

someone else just opened a thread saying they're having issues with private networking too
perhaps it's a railway error 🤔

sonic badge
#

Been facing it for quite some time, not a recent issue for me

scenic pebble
sonic badge
#

@warped surge can you look into the issue?

warped surge
#

Afraid I have no idea what the issue is, best just wait for someone who knows more than I do

mystic vault
# sonic badge I am using python's fastAPI for the API and running via uvicorn. uvicorn api:app...

that is the start command for voiceless-cap.railway.internal?
if so, that would only work to expose your app via the public network.
0.0.0.0 is an ipv4 address and the private network is ipv6 only.
to run uvicorn listening on an ipv6 address you would want to use the start command as follows
uvicorn api:app --host :: --port $PORT
but unfortunately uvicorn doesn't support dual stack binding (ipv4 and ipv6)
so while this will work to make your app accessible over the private network, public access will not longer work, if that's fine for you then stop here!
if you need both public and private access, I suggest using hypercorn, it should be a drop in replacement, add it to your requirements.txt and then use this start command
hypercorn api:app --bind [::]:$PORT
this will bind to all ipv4 and ipv6 addresses and allow your app to be accessed publicly and privately

#

tl;dr this isn't a railway issue