The UI skeleton shows forever in my deployed server

After running a simple app, it shows this forever:

Running command:

streamlit run demo.py --server.port 3669 --server.address localhost

Code:

import streamlit as st

st.title('Hello Streamlit!')

Deployed on my own server, URL is http://mkt.iosre.com/

No errors at all, the log is:

Collecting usage statistics. To deactivate, set browser.gatherUsageStats to false.             


  You can now view your Streamlit app in your browser.

  URL: http://localhost:3669

Python 3.10.15, streamlit 1.40.1.

Any ideas? Thank you!

Based on browser logs, frontend is unable to establish web socket connection with backend Streamlit server.

Possible Causes

  1. Firewall or Proxy Configuration: WebSockets require open and direct communication between the client and server. If there’s a firewall, reverse proxy, or load balancer, it may be blocking WebSocket connections.
  2. Improper Reverse Proxy Setup: If you’re using a reverse proxy like Nginx or Apache, the WebSocket headers might not be properly configured.
  3. HTTP vs. HTTPS Mismatch: WebSocket connections (ws://) fail if served over HTTPS without upgrading to secure WebSockets (wss://).
  4. Domain Resolution Issues: Ensure the domain (mkt.iosre.com) resolves to the correct server IP and that no conflicts exist in your network setup.

Thank you! It’s because of nginx config, ChatGPT guided me to fix it then it’s OK now.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.