Internal Domains Connecting Error
cicerorph
HOBBYOP

2 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

0 Replies

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


cicerorph
HOBBYOP

2 months ago

Uhhh, how would I do that?


cicerorph
HOBBYOP

2 months ago

It's on 0.0.0.0


What's the framework?


Yeah that's IPv4 only


cicerorph
HOBBYOP

2 months ago

Python using fastapi


cicerorph
HOBBYOP

2 months ago

bru


Set host=None


cicerorph
HOBBYOP

2 months ago

Okay a sec


cicerorph
HOBBYOP

2 months ago

didn't work


Can you share the deployment logs please


And your bind command


cicerorph
HOBBYOP

2 months ago

1429314134373044500


Can you share the line of code where you bind


cicerorph
HOBBYOP

2 months ago

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


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


That will set it to the string None


cicerorph
HOBBYOP

2 months ago

?

1429314550464905200



That's what you have currently?


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


cicerorph
HOBBYOP

2 months ago

Yeah


cicerorph
HOBBYOP

2 months ago

sure, I will put it manually


Just to check.


But what you wrote should work…



cicerorph
HOBBYOP

2 months ago

1429315210254090500


cicerorph
HOBBYOP

2 months ago

Well, I might just search it up


cicerorph
HOBBYOP

2 months ago

Wait


cicerorph
HOBBYOP

2 months ago

for IPV6, isnt it just "::"?


None is dualstack


Brody stop lurking 😭


cicerorph
HOBBYOP

2 months ago

idk bro


cicerorph
HOBBYOP

2 months ago

its midnight


cicerorph
HOBBYOP

2 months ago

1am


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

2 months ago

wait


cicerorph
HOBBYOP

2 months ago

IT WORKED


What'd you do 🤨


cicerorph
HOBBYOP

2 months ago

I forgot to put the 8000 port again on the url



Status changed to Solved brody about 2 months ago


uxuz
MODERATOR

2 months ago

!s


Loading...