V2 runtime issue when setting port as 443
I just created a new instance with automatically the V2 runtime set and here the builds do not deploy and I get the error message:
When I switch the runtime back to Legacy, it works and deploys correctly.
If I try to change the port to something else, i.e. 3000, with the V2 runtime the healthcheck does not work. It is a NextJs project.
Solution:Jump to solution
please use a non privileged port.
as for the health check failing, there's a bug with the v2 runtime where your app needs to listen on ipv6 to pass a health check, if I'm not mistaken you should be able to set a
HOSTNAME
variable to ::
or change your start script to add a -H ::
flag to next start
, but I'm not sure if you are using next start
so try the variable first...15 Replies
Project ID:
a0f3572b-295e-4a43-b776-ce352a4d0980
a0f3572b-295e-4a43-b776-ce352a4d0980
Solution
please use a non privileged port.
as for the health check failing, there's a bug with the v2 runtime where your app needs to listen on ipv6 to pass a health check, if I'm not mistaken you should be able to set a
HOSTNAME
variable to ::
or change your start script to add a -H ::
flag to next start
, but I'm not sure if you are using next start
so try the variable firstThanks for the info
@Brody I used port 443 so the
x-forwarded-port
would be passed correctly, but now it thinks this is port 3000
So the above solution works, but the I18n plugin I use, checks the x-forwarded-port
to apply certain redirectsGitHub
After updating to v3.11.1 rewrite/redirects append a port to the UR...
Description The last change for internal redirecting appends a port to the URL. However in our setup at Railway.app this does a faulty redirect. When the middleware should rewrite / redirect, it ta...
railway does not set a x-forwarded-port header
instead of setting your PORT to 443, this is the correct solution https://github.com/amannn/next-intl/issues/987#issuecomment-2091359239
Hmm okay, hardcoding it for the port can be fine. But the same issue applies also for X-Forwarded-For I would think and then the originating client IP is lost.
https://utilities.up.railway.app/raw
pseudo code
if X-Forwarded-Proto == https { X-Forwarded-Port = 443 }
Check, thanks
PLAT-1415 - V2 runtime cannot bind on 443
The V2 runtime seems unable to bind to 443
Status
Triage
Platform
A fix has been rolled out for this
What does the fix entail exactly?
I assume it would allow you to bind to a non-privileged port given the context of this thread
You can now use port 443
fwiw I still think binding to a non-privileged port is the more correct option