andremaytorena
PROOP
9 months 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
brody
EMPLOYEE
9 months ago
you want to use 8080 is the request since that is what gunicorn is listening on
brody
EMPLOYEE
9 months ago
no problem!
brody
EMPLOYEE
9 months ago
!s
kvnbbg
HOBBY
7 months ago
so, we can't change the port for multiple app in only one group ?
Status changed to Solved brody • 7 months ago