Failed to connect to service using internal Networking.
I have a flask app which is using gunicorn and the procfile contains this command -> web: gunicorn -b 0.0.0.0:$PORT -b [::1]:$PORT main:app
I have added 5000 as the value of the port and I am making a call to this internal service from another service in the same environment and I am getting the error shown below.
Solution:Jump to solution
the internal network is ipv6 only, that means you need to configure gunicorn to listen on ipv6 interfaces.
sample start command
...
14 Replies
Project ID:
a77a350d-d4d7-4ea2-bdde-a846a7feca5e
Project Id ->
a77a350d-d4d7-4ea2-bdde-a846a7feca5e
Solution
the internal network is ipv6 only, that means you need to configure gunicorn to listen on ipv6 interfaces.
sample start command
I tried this also but faced the same issue
i have used that start command successfully
and also If public url is also enabled shouldn't the app also support ipv4 traffic
for gunicorn
[::]
will configure it for dual stack binding, ipv4 and ipv6should i then add this
gunicorn main:app -b [::]:$PORT
command under start command in deploy section?you should set that in your procfile or railway.json
assuming your app is
main:app
currently the procfile has this command and the issue is still popping up.
✅
that is not like the command i have provided you
Thanks @Brody, it worked.
dual binding also worked.
for future refernce, it should be
::
and not ::1