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:
the internal network is ipv6 only, that means you need to configure gunicorn to listen on ipv6 interfaces. sample start command
gunicorn main:app -b [::]:$PORT
gunicorn main:app -b [::]:$PORT
...
Jump to solution
14 Replies
Percy
Percy16mo ago
Project ID: a77a350d-d4d7-4ea2-bdde-a846a7feca5e
paragthakur56
paragthakur56OP16mo ago
Project Id -> a77a350d-d4d7-4ea2-bdde-a846a7feca5e
Solution
Brody
Brody16mo ago
the internal network is ipv6 only, that means you need to configure gunicorn to listen on ipv6 interfaces. sample start command
gunicorn main:app -b [::]:$PORT
gunicorn main:app -b [::]:$PORT
paragthakur56
paragthakur56OP16mo ago
I tried this also but faced the same issue
Brody
Brody16mo ago
i have used that start command successfully
paragthakur56
paragthakur56OP16mo ago
and also If public url is also enabled shouldn't the app also support ipv4 traffic
Brody
Brody16mo ago
for gunicorn [::] will configure it for dual stack binding, ipv4 and ipv6
paragthakur56
paragthakur56OP16mo ago
should i then add this gunicorn main:app -b [::]:$PORT command under start command in deploy section?
Brody
Brody16mo ago
you should set that in your procfile or railway.json assuming your app is main:app
paragthakur56
paragthakur56OP16mo ago
currently the procfile has this command and the issue is still popping up.
paragthakur56
paragthakur56OP16mo ago
Brody
Brody16mo ago
that is not like the command i have provided you
paragthakur56
paragthakur56OP16mo ago
Thanks @Brody, it worked. dual binding also worked.
Brody
Brody16mo ago
for future refernce, it should be :: and not ::1
Want results from more Discord servers?
Add your server