Internal Domains Connecting Error
cicerorph
HOBBYOP

a year ago

I have two services that connect to each other, one being a main server and another running as a worker server (planning on adding more), I run them on port 8000 each, when I try to connect to the worker it says 502 Bad Gateway

I'm using this:

http://(INTERNALURL):8000

Solved$10 Bounty

42 Replies

a year ago

Is your service that you're calling internally bound to IPv6?


cicerorph
HOBBYOP

a year ago

Uhhh, how would I do that?


cicerorph
HOBBYOP

a year ago

It's on 0.0.0.0


a year ago

What's the framework?


a year ago

Yeah that's IPv4 only


cicerorph
HOBBYOP

a year ago

Python using fastapi


cicerorph
HOBBYOP

a year ago

bru


a year ago

Set host=None


cicerorph
HOBBYOP

a year ago

Okay a sec


cicerorph
HOBBYOP

a year ago

didn't work


a year ago

Can you share the deployment logs please


a year ago

And your bind command


cicerorph
HOBBYOP

a year ago

1429314134373044417


a year ago

Can you share the line of code where you bind


cicerorph
HOBBYOP

a year ago

uvicorn.run(app, host=settings.HOST, port=settings.PORT)


a year ago

That won't do the same thing as just setting host=None


a year ago

That will set it to the string None


cicerorph
HOBBYOP

a year ago

?

1429314550464905226


a year ago

Oh.


a year ago

That's what you have currently?


a year ago

And you can confirm that it is set to type None before bind?


cicerorph
HOBBYOP

a year ago

Yeah


cicerorph
HOBBYOP

a year ago

sure, I will put it manually


a year ago

Just to check.


a year ago

But what you wrote should work...


a year ago

:/


cicerorph
HOBBYOP

a year ago

1429315210254090383


cicerorph
HOBBYOP

a year ago

Well, I might just search it up


cicerorph
HOBBYOP

a year ago

Wait


cicerorph
HOBBYOP

a year ago

for IPV6, isnt it just "::"?


a year ago

None is dualstack


a year ago

Brody stop lurking 😭


cicerorph
HOBBYOP

a year ago

idk bro


cicerorph
HOBBYOP

a year ago

its midnight


cicerorph
HOBBYOP

a year ago

1am


a year ago

Uvicorn will then hand over None as a value to the loop.create_server() function, which leads to it listening on all interfaces including both IPv4 and IPv6 in dual stack mode.


cicerorph
HOBBYOP

a year ago

wait


cicerorph
HOBBYOP

a year ago

IT WORKED


a year ago

What'd you do 🤨


cicerorph
HOBBYOP

a year ago

I forgot to put the 8000 port again on the url


a year ago


Status changed to Solved brody • 12 months ago


a year ago

!s


Welcome!

Sign in to your Railway account to join the conversation.

Loading...