Error: while running local server for streamlit. page is not loading
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1142:49)
at afterConnectMultiple (node:net:1723:7)
7:52:05 pm [vite] http proxy error: /_stcore/host-config
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1142:49)
at afterConnectMultiple (node:net:1723:7)
7:52:06 pm [vite] http proxy error: /_stcore/health
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1142:49)
at afterConnectMultiple (node:net:1723:7)
7:52:06 pm [vite] http proxy error: /_stcore/host-config
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1142:49)
at afterConnectMultiple (node:net:1723:7)
7:52:07 pm [vite] http proxy error: /_stcore/host-config
AggregateError [ECONNREFUSED]:
at internalConnectMultiple (node:net:1142:49)
Hey, thanks for sharing your error and welcome to the Streamlit community!
The error ECONNREFUSED with /stcore/host-config and /stcore/health usually means the Streamlit backend server isn’t running or isn’t reachable at the expected port. This often happens if Streamlit failed to start, is running on a different port, or something else is using the port.
To fix:
- Make sure Streamlit is running (
ps -Al | grep streamlit on Linux/Mac) and check the terminal for errors.
- Confirm you’re not using port 3000, as it’s reserved for internal development and will cause this issue—try port 8501 or 80 instead.
- If you changed the port, update your frontend/proxy config to match.
- Temporarily disable CORS and XSRF protection to rule out config issues:
streamlit run your_app.py --server.enableCORS=false --server.enableXsrfProtection=false
- If using a proxy (like Vite or Nginx), ensure it’s forwarding requests to the correct Streamlit port.
For more details, see Streamlit’s troubleshooting guide and port 3000 issue. If you’re still stuck, please share your streamlit run command, config, and any relevant code or repo link so the community can help debug! 
Sources: