The region of my app has changed
msoutopico
HOBBYOP

a year ago

Project ID: 483187d7-a9d4-4961-b10f-f2804b57d52b

Today it seems my Railway app cannot access the MongoDB database. I can see it does when I whitelist IP 0.0.0.0/0 so the problem must be related to the network access. It also works when I run it locally, but not from Railway.

I'm not sure how this can be related but when I deployed my app, I selected US West (Oregon). I had whitelisted all IPs I could find here https://utilities-gcp-us-west.up.railway.app/cidr-list for the US West (Oregon) region. Today I see the region has changed to US West (California) and I cannot change it back to Oregon.

Can you help? Can you help me determine what IP I should whitelist precisely? Or whether the problem could be related to something else?

Thanks.
<#1006629907067064482> <#1067670924385583114>

Solved

24 Replies

msoutopico
HOBBYOP

a year ago

I have tried whitelisting IPs for US West (California) and EU West (Amsterdam) but that doesn't seem to help.


a year ago

Railway recently migrated a lot of apps to metal automatically, if it's a big issue then you can migrate your app back to US West Oregon for now

I'll go ask about the metal IP address range for us-west


msoutopico
HOBBYOP

a year ago

Thanks @Fragly

It is a big issue in as much as my app won't work at all. If this cannot be solved, I'll have to be deploy my app somewhere else quickly.

Would migrating the app back to US West Oregon be only a temporary measure? If that's the case, let's rather go for something more permanent. If not, I'd appreciate some tip about how I can do that. Simply changing the region in the settings didn't work, the region changes when I re-deploy.

I don't mind what region it is as long as it works. I can whitelist up to 200 IPs.


a year ago

Railway will remove their reliance on GCP in the near future and all deploys will happen on metal, so yea staying on oregon is a temporary solution
once I know where I can find the IP range for us-west metal then I'll share that with you and you can whitelist those IPs and move to metal

It's odd to me that your region would change when you redeploy.. I have deployments in oregon right now so I know it's still available 🤔
if you're sure it is moving the region back then you could try adding a volume
metal doesn't support volume yet so adding a volume will prevent it from moving back to metal (for now)


a year ago

By the way, if you want more info on metal, there's a very detailed page all about it here:


msoutopico
HOBBYOP

a year ago

Indeed, it's odd to me too, but that's what happens. Can you see what I mean in the gif?


a year ago

yea, that's very weird..
see if adding a volume will help


msoutopico
HOBBYOP

a year ago

adding the volume did the trick


msoutopico
HOBBYOP

a year ago

thanks a lot @Fragly


msoutopico
HOBBYOP

a year ago

I guess that's good for now


msoutopico
HOBBYOP

a year ago

when you can, will you please let me know how I can find out what IPs correspond to the metal regions?


a year ago

No problem! yes I'll ping you the moment I have information on that


a year ago

Hey @مــــــانــــــو, the IP range for Railway US West metal is 162.220.232.0/23


msoutopico
HOBBYOP

a year ago

thanks @Fragly, I can whitelist individual IPs, not sure how I must use a "range". Does that mean that I should whitelist the 512 IPs between 162.220.232.0 and 162.220.233.255?


msoutopico
HOBBYOP

a year ago

unfortunately, I cannot whitelist more than 200 IP addresses


a year ago

you would need to upgrade to Pro for a single static IP, since this is a temporary solution


a year ago

though most firewalls allow you to enter a cidr range


msoutopico
HOBBYOP

a year ago

MongoDB Atlas does not allow whitelisting an entire CIDR range directly, but I have found out I can whitelist smaller subnets. I have worked out how to consume only two slots. Instead of whitelisting every individual IP, I can break down the /23 range into two /24 blocks:

162.220.232.0/24 (covers 162.220.232.0 – 162.220.232.255)
162.220.233.0/24 (covers 162.220.233.0 – 162.220.233.255)

Thanks @Brody and @Fragly for your help.


a year ago

Awesome, glad to hear you got it working


a year ago

Clear to mark as solved?


msoutopico
HOBBYOP

a year ago

Yes, please


msoutopico
HOBBYOP

a year ago

!s


a year ago

🫡 perfect


a year ago

!s


Status changed to Solved dev about 1 year ago


Loading...