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•6mo ago
Project ID: 2504e51b-d885-44bb-8f3f-39a0cca99259
curiebufferfinance
curiebufferfinance•6mo ago
2504e51b-d885-44bb-8f3f-39a0cca99259
Fragly
Fragly•6mo ago
does the project you are trying to connect to have App Sleeping enabled?
curiebufferfinance
curiebufferfinance•6mo ago
Where can i check that?
Fragly
Fragly•6mo ago
in your service settings but if you don't know about it then you likely don't have it enabled
curiebufferfinance
curiebufferfinance•6mo ago
Can't find any such option in the settings
Fragly
Fragly•6mo ago
Oh yea, it's a beta feature, I forgot It's not the issue here
curiebufferfinance
curiebufferfinance•6mo 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•6mo ago
someone else just opened a thread saying they're having issues with private networking too perhaps it's a railway error 🤔
curiebufferfinance
curiebufferfinance•6mo ago
Been facing it for quite some time, not a recent issue for me
gazhay
gazhay•6mo 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
curiebufferfinance•6mo ago
@Fragly can you look into the issue?
Fragly
Fragly•6mo ago
Afraid I have no idea what the issue is, best just wait for someone who knows more than I do
Solution
Brody
Brody•6mo 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•6mo ago
tl;dr this isn't a railway issue
Want results from more Discord servers?
Add your server
More Posts
Can not connect to Database (both from UI and external services)I migrated my DB to the new system and my project now can not connect to it anymore. When trying toCronjob code executing every 13 seconds instead of on the schedule 0 13 * * *The process is the one that should send one daily notification to all the users. Even after I have InvoicesI am in EU, and for your invoices to be valid here, they need to include the VAT number of my companPostgres Migration Crashes Servers after deleting pluginI just did the automatic migration process, after it finished I just deleted the migration plugin beCan't reconnect to wordpress databaseHad some issues with an older instance of a wordpress database reaching capacity while on the hobby postgres migration stuck on Deploying Migration ServiceHELP! I initiated the database migration and it's been stuck on the deploying service step for a whiJust deployed a Vite+React app and image is still the first one I deployedHi! I am deploying a Vite+React app and even though everything is being deployed great. Since I deplPGBouncer and IPv4 DeprecationHey everyone. As some of you have seen Supabase is changing some things up for their postgres db conFastAPI + Hypercorn dropping connection after 60 secondsHey I'm running a **FastAPI with hypercorn**. Everything was fine last month, now encountering serveUnable to establish postgres connection during deploymentHi there! I understand there was a partial outage at Asia Pacific region and may have impacted my d