#private network gunicorn

9 messages · Page 1 of 1 (latest)

solar cosmos
#

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('<urllib3.connection.HTTPConnection object at 0x7fa709a3ebd0>: Failed to establish a new connection: [Errno 111] ECONNREFUSED'))```
grim runeBOT
#

Project ID: N/A

solar cosmos
#

8eca95b8-b3e6-413d-8ee9-deeebf5ebef1

wicked grail
#

you want to use 8080 is the request since that is what gunicorn is listening on

solar cosmos
#

Trying that now

#

ok that worked thank you

wicked grail
#

no problem!

#

!s

pine wharf