question

KanishkaKartikeya-9946 avatar image
0 Votes"
KanishkaKartikeya-9946 asked deherman-MSFT answered

I am able to run my python Flask app on Azure VM but unable to access it through browser

quickserv@mrquickserv:~/MrQuickServ$ python3 main.py
Serving Flask app 'base' (lazy loading)
Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
Debug mode: on
Running on all addresses (0.0.0.0)
WARNING: This is a development server. Do not use it in a production deployment.
Running on http://127.0.0.1:8400
Running on http://10.0.0.4:8400 (Press CTRL+C to quit)
Restarting with stat
Debugger is active!
* Debugger PIN: 125-646-968


I use the my public IP address along with port but I get the below error:

http://public IP address:8400/

This site can’t be reached xx.xxx.xx.xx took too long to respond.
Try:

Checking the connection
Checking the proxy and the firewall
Running Windows Network Diagnostics
ERR_CONNECTION_TIMED_OUT



azure-virtual-machines
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

deherman-MSFT avatar image
0 Votes"
deherman-MSFT answered

@KanishkaKartikeya-9946
It seems that this might be an issue with your Network Security Group for your VM. Please verify you have inbound port TCP 8400 allowed for your VM. You can also utilize the portal to diagnose your issue.

If the port is reachable through the NSG please check that the program is reachable by testing locally on the VM.

Hope this helps! Let me know if you are still facing issues or need further assistance.



Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.