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
0 Replies
2 months ago
Is your service that you're calling internally bound to IPv6?
2 months ago
What's the framework?
2 months ago
Yeah that's IPv4 only
2 months ago
Set host=None
2 months ago
Can you share the deployment logs please
2 months ago
And your bind command
2 months ago
Can you share the line of code where you bind
[uvicorn.run](uvicorn.run)(app, host=[settings.HOST](settings.HOST), port=settings.PORT)
2 months ago
That won't do the same thing as just setting host=None
2 months ago
That will set it to the string None
2 months ago
Oh.
2 months ago
That's what you have currently?
2 months ago
And you can confirm that it is set to type None before bind?
2 months ago
Just to check.
2 months ago
But what you wrote should work…
2 months ago
:/
2 months ago
None is dualstack
2 months ago
Brody stop lurking 😭
2 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.
2 months ago
What'd you do 🤨
2 months ago
Status changed to Solved brody • about 2 months ago
2 months ago
!s


