App inaccessible on specific ports from external machine

I am encountering a perplexing issue with my Streamlit app deployment. I am running the app on an AWS EC2 instance using the command:

python -m streamlit run app.py --server.port 8080 --server.address="0.0.0.0"

The app loads perfectly in the server machine’s browser, and it also works fine on some ports (e.g., 8080 or 8051) when accessed from an external machine. However, on other ports like 8081, I only see a bluish canvas in the browser, indicating that the app is attempting to load but never actually does.

Any suggestions on why this issue occurs only on specific ports or how to resolve it would be appreciated.

Hi @thevolatilebit

Have you tried looking into adjusting the port parameter in the config.toml file:

1 Like

Thank you, @dataprofessor

I also tried following the guides at App is not loading when running remotely - Streamlit Docs, but nothing really helped. I suspect this might be due to content interception caused by the server running behind a corporate firewall, but I’m not sure.