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

Kanishka Kartikeya 21 Reputation points
2022-05-11T13:52:33.917+00:00

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
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
0 comments No comments
{count} votes

Accepted answer
  1. deherman-MSFT 38,021 Reputation points Microsoft Employee Moderator
    2022-05-11T17:02:59.91+00:00

    @Kanishka Kartikeya
    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.

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.