Internal Domains Connecting Error
cicerorph
HOBBYOP

8 months 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

8 months ago

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


cicerorph
HOBBYOP

8 months ago

Uhhh, how would I do that?


cicerorph
HOBBYOP

8 months ago

It's on 0.0.0.0


8 months ago

What's the framework?


8 months ago

Yeah that's IPv4 only


cicerorph
HOBBYOP

8 months ago

Python using fastapi


cicerorph
HOBBYOP

8 months ago

bru


8 months ago

Set host=None


cicerorph
HOBBYOP

8 months ago

Okay a sec


cicerorph
HOBBYOP

8 months ago

didn't work


8 months ago

Can you share the deployment logs please


8 months ago

And your bind command


cicerorph
HOBBYOP

8 months ago

1429314134373044417


8 months ago

Can you share the line of code where you bind


cicerorph
HOBBYOP

8 months ago

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


8 months ago

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


8 months ago

That will set it to the string None


cicerorph
HOBBYOP

8 months ago

?

1429314550464905226


8 months ago

Oh.


8 months ago

That's what you have currently?


8 months ago

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


cicerorph
HOBBYOP

8 months ago

Yeah


cicerorph
HOBBYOP

8 months ago

sure, I will put it manually


8 months ago

Just to check.


8 months ago

But what you wrote should work...


8 months ago

:/


cicerorph
HOBBYOP

8 months ago

1429315210254090383


cicerorph
HOBBYOP

8 months ago

Well, I might just search it up


cicerorph
HOBBYOP

8 months ago

Wait


cicerorph
HOBBYOP

8 months ago

for IPV6, isnt it just "::"?


8 months ago

None is dualstack


8 months ago

Brody stop lurking 😭


cicerorph
HOBBYOP

8 months ago

idk bro


cicerorph
HOBBYOP

8 months ago

its midnight


cicerorph
HOBBYOP

8 months ago

1am


8 months 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

8 months ago

wait


cicerorph
HOBBYOP

8 months ago

IT WORKED


8 months ago

What'd you do 🤨


cicerorph
HOBBYOP

8 months ago

I forgot to put the 8000 port again on the url


8 months ago


Status changed to Solved brody 8 months ago


8 months ago

!s


Welcome!

Sign in to your Railway account to join the conversation.

Loading...