I deployed a dash app in aws ecs. Everything works fine and the task seems to be running.
However when i try to use the public or private ip on the port that the app is running (10000), it is not working. Any idea why it could be happening?
My port:
Make sure you have accepted inbound rules for your current IP for port 10000.
Related
I have been banging my head against a wall trying to get my streamlit app deployed on an ec2 instance so I can share with others, however I am having trouble connecting to my streamlit app via the browser. I noticed that on my local machine I also have the same issue, when I run the streamlit app locally, I am able to access my streamlit app via local host:
http://127.0.0.1:8501/
However the "External URL" and "Network URL" do not work and the page infinitely loads and eventually times out. Here is the external url & network url given by streamlit when you run streamlit run app.py
Collecting usage statistics. To deactivate, set browser.gatherUsageStats to False.
You can now view your Streamlit app in your browser.
Network URL: http://<network_ip>:8501
External URL: http://<external_ip>:8501
I can confirm that I have allowed port 8501 TCP inbound traffic on my local windows machine as well as on the ec2 instance.
Here is my security group config:
EC2 Security Group
How do I make my streamlit application accessible via the given Network URL & External URL by streamlit and not just via localhost:8501?
Would appreciate anyone's advice who has deployed a streamlit web app on an EC2 instance!
I have checked that:
My ec2 instance is listening on TCP port 8501
That the streamlit service is running by running "ps aux | grep streamlit"
Restarting my instance
So this was a bit of a face-palm moment for me, the problem I was encountering was as a result of the internal firewall blocking connections to port 8501 on my corporate network.
i'm kinda new to all this, so bare with me
I'm trying to deploy my flask app to EC2, and before getting to set a WSGI server, id like to try to connect to port 8080
the code can be found here: https://github.com/Klasyer/POBAP
I've set the flask app host to 0.0.0.0 and port to 8080
In EC2 i opened the inbound rule for 8080
When i try to open the app through the web (http://18.223.32.186:8080/) i get a 404.
What am i missing/doing wrong?
Thanks ahead for any help
Try attaching an elastic IP address to the instance that your running and once it is done you can access the flask app running in the instance. But you should include the port number always while accessing it.
If you need the app to be accessed without the use of port number then in your flask app change the port number to 443 which is for HTTPS and 80 for HTTP. If you need HTTPS the process is somewhat different because you need to make a purchase but for HTTP it's free. So go on with HTTP by using the port number as 80
app.run(host='0.0.0.0', port=80)
I have a python application hosted by a node.js frontend. I am running that on a linux vm on Google Cloud virtual machine (GCP).
node appname runserver 8080 command starts local server within VM but I am wondering what would be step by step process to access it via a DNS from outside world.
Or if there is better approach to host python ML applications behind a web interface, then please suggest.
You need to use forever for this.
Forever will move the node process to the background and service will keep running in the background even if you log out of the server. And In order to access from outside point a DNS domain to this IP address of the machine and then Proxy Pass the request on port 80 to the port your service is running on.
Then you will be able to access it via domain name.
Look for ProxyPass directive in the Http server. That would work for you. :D
I deployed my flask rest api on IIS 8 to windows server 2012 r2. I followed this article. (https://medium.com/#bilalbayasut/deploying-python-web-app-flask-in-windows-server-iis-using-fastcgi-6c1873ae0ad8) I can browse the rest api on the local server but I can not browse the api from other computers on public internet. I can ping the public IP of the server without problem. There is no firewall rule that blocks the server. Would you please help me?
PS. I am trying to browse by the IP, 185.201.212.219. Is it related to this?
edit1: I will try this which is from flask documentation.
Externally Visible Server
If you run the server you will notice that the server is only accessible from your own computer, not from any other in the network. This is the default because in debugging mode a user of the application can execute arbitrary Python code on your computer.
If you have the debugger disabled or trust the users on your network, you can make the server publicly available simply by adding --host=0.0.0.0 to the command line:
flask run --host=0.0.0.0
This tells your operating system to listen on all public IPs.
edit2: Adding host parameter didn't work.
Is there any ideas?
Thanks in advance.
All ports except 80 was open. When I set port=80, all my troubles seem so far away :)
Im developing an app using flask framework in python, i wanted to host it on my pc for a few people to be able to visit it, similar to wamps put online feature but for flask instead, i dont want to deploy it to the cloud just yet. how can i do it.
Enable port forwarding on your router, start flask on the 0.0.0.0 address of your computer, set the forwarded port to be the one started on your laptop. This will now allow your LAN and calls to your ISP provided address to be directed to your laptop.
To clarify, LAN can do it without port forwarding in my experience.