andremaytorena
PROOP
a year ago
I am trying to connect to my flask api via private network, I've set this start command as per docs:
gunicorn app:app --bind [::]:${PORT-3000}
The API initializes fine, but when I try to send a request from my other api through the private network like this:
try:
res = requests.post("http://master-api.railway.internal:3000/call")
print(res.text)
print(res.status_code)
return {}, 200
except Exception as e:
print(e)
False```
It gives me this error:
```HTTPConnectionPool(host='master-api.railway.internal', port=3000): Max retries exceeded with url: /call (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 111] ECONNREFUSED'))```7 Replies
a year ago
you want to use 8080 is the request since that is what gunicorn is listening on
a year ago
no problem!
a year ago
!s
a year ago
so, we can't change the port for multiple app in only one group ?
Status changed to Solved brody • 11 months ago