Private networking not working

Getting this error while trying to connect via private networking within a project
No description
Solution:
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...
Jump to solution
15 Replies
Percy
Percy•11mo ago
Project ID: 2504e51b-d885-44bb-8f3f-39a0cca99259
curiebufferfinance
curiebufferfinanceOP•11mo ago
2504e51b-d885-44bb-8f3f-39a0cca99259
Fragly
Fragly•11mo ago
does the project you are trying to connect to have App Sleeping enabled?
curiebufferfinance
curiebufferfinanceOP•11mo ago
Where can i check that?
Fragly
Fragly•11mo ago
in your service settings but if you don't know about it then you likely don't have it enabled
curiebufferfinance
curiebufferfinanceOP•11mo ago
Can't find any such option in the settings
Fragly
Fragly•11mo ago
Oh yea, it's a beta feature, I forgot It's not the issue here
curiebufferfinance
curiebufferfinanceOP•11mo ago
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
Fragly
Fragly•11mo ago
someone else just opened a thread saying they're having issues with private networking too perhaps it's a railway error 🤔
curiebufferfinance
curiebufferfinanceOP•11mo ago
Been facing it for quite some time, not a recent issue for me
gazhay
gazhay•11mo ago
I found a workaround for my case. Even though I had been working for months, suddenly it was getting the private dns error. I found docs that said private networking is not available immediately and added a noop delay for 5s and then everything was working again. YMMV
curiebufferfinance
curiebufferfinanceOP•11mo ago
@Fragly can you look into the issue?
Fragly
Fragly•11mo ago
Afraid I have no idea what the issue is, best just wait for someone who knows more than I do
Solution
Brody
Brody•11mo ago
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
Brody
Brody•11mo ago
tl;dr this isn't a railway issue
Want results from more Discord servers?
Add your server