简体   繁体   中英

Flask server running using private ip on AWS

I'm run my server on basic host and port

self.app.run(host='0.0.0.0')

And server has running on 172.31.26.176:5000 but it my private AWS ip and page doesn't load. If i select port (16324) server run with my port, but page also not loaded. If i use my public AWS ip i take error.

OSError: [Errno 99] Cannot assign requested address

Its my first server. On the local machine he work normaly.

  1. Check the route table of your subnet and ensure that route to internet (IGW) is added in it.
  2. Check the security group of your EC2 and ensure inbound traffic is allowded for your flask port.

Then run the application and hit YOUR_AWS_EC2_PUBLIC_IP:5000 in browser.

OSError: [Errno 99] Cannot assign requested address

This error was likely caused because the port/ip requested is already taken. Check whether flask app is already running on your requested address:port

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM