flask – Cant access server on Google Cloud Compute Engine
I’ve set up a Flask server on a Linux VM on Google Cloud Compute Engine.But I’m unable to access it through the external IP. I’m able to successfully test the server through its local host.
sudo wget http://localhost:5000/
I’m able to see the server receiving the requests successfully.
I start the server with the code
if __name__ == '__main__':
driver = initiate_webdriver()
app.run(host="0.0.0.0", port=5000)
driver.quit()
And after running
flask run
I get the output,
* Serving Flask app 'app'
* Debug mode: off
WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5000
* Running on http://10.128.0.6:5000
I understand I’m to setup firewall rules to allow the VM accept http/https requests. I believe I have done both things and yet can not access the server externally
Read more here: Source link