_stcore/health doesn't change port when running on different port


I am trying to run a minimal streamlit app on port 3000 (localhost). I set up a config.toml file with a different server.port configuration. Everytime I start I get the following error messages in my browser console:
WebsocketConnection Attempting to connect to http://localhost:8501/_stcore/health.
GET http://localhost:8051/_stcore/health net::ERR_CONNECTION_REFUSED
GET http://localhost:8051/_stcore/allowed_message_origins net::ERR_CONNECTION_REFUSED

Steps to reproduce

The app itself just contains one title and nothing else

import streamlit as st
st.title("Test App")

The config file looks as follows


I start it using streamlit run main.py. The python console shows that the app is served, but in the Browser the "please wait… " dialoge does not disappear and I get the aforementioned error messages in the console of the browser

Debug info

  • Streamlit version: 1.22.0
  • Python version: 3.11.3
  • OS version: Windows 10
  • Browser version: Edge version 113.0.1774.50

Requirements file

Just streamlit

I’m running on the streamlit cloud and getting those same errors.

Same issue. Did you find a solution?

I’m not sure why that’s happening, but I’ll ask around.

Turns out, port 3000 is Streamlit’s internal development port, so that’s the only port that won’t work. We may get a workaround for this eventually, but for now you can just avoid using port 3000.

We’ll get this added to the docs.

1 Like

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