Deploy failed: connection refused

Hi Streamlit Gurus, I met the same problem. I鈥檝e a small app, but it just fails to deploy. It runs well locally.

Could anybody have a look at it? The link address is: TOVA/TOVA.py at main 路 dwleeibru/TOVA 路 GitHub

I checked the link:Deploy an app - Streamlit Docs

For unknown reasons, I cannot find relevant (resource-related) information.

Many thanks, Jimmy ~

Hey @dwleeibru,

Can you share the error message you鈥檙e seeing?

1 Like

Hi Caroline, Many thanks for the reply.

The error msg is: The service has encountered an error while checking the health of the Streamlit app: Get 鈥http://localhost:8501/healthz鈥: dial tcp IPAddress:8501: connect: connection refused

Look forward to getting your help. Best ~

It sounds like it did deploy 鈥 can you share the link to the app?

1 Like

Yes, that鈥檚 in the initial post. Please check below:

Can you share the link to the deployed app rather than the GitHub repo?

1 Like

Oh, I see.

Please check below:
https://dwleeibru-tova-tova-ecdi8g.streamlit.app/

So I checked the logs, and it looks like you might have an invalid character in your config file. Can you double check that?

1 Like

If the log is from yesterday, yes, I have copied a new one to replace it. Let me check, anyway.
I did find several threads about the connection refusal issue, but cannot find concise solutions.

I copied the config.toml from Configuration - Streamlit Docs
, replace original one and reboot, the error msg is still the same.

Weirdly, the issue still seems to be coming from the config file. I forked your repo and deleted the contents of the config file, and that resolved the issue. It鈥檚 deployed here (I had to also add a missing package to the requirements file). I鈥檓 not sure exactly what was wrong with the config file, but it seems like it could be an invalid/invisible character potentially

1 Like

Thank you so much for the help. May I ask: what is the missing package (could you please paste it to the reply so I can work out from my end)? and you remove all the content of config file?

The missing package was streamlit-aggrid. Yup, I just removed the contents of the config file 鈥 probably overkill, you could probably also just go through and make sure there aren鈥檛 any funky characters

1 Like

Many many thanks. If I reboot from my end, will your https://carolinedlu-tova-tova-0483p4.streamlit.app/ be killed?

Nope, it鈥檚 a separate repo

1 Like

Yes, it鈥檚 solved after I delete the content of config.toml.
If I find out what鈥檚 wrong, I鈥檒l post it here.
I really appreciate your help. :smile:

1 Like

Hey @dwleeibru ,

Can you share the error message/SS you are getting. Also, where are you trying to deploy the app?
Is it Azure app service or VM?

regards,
-Chetan

Hi, thanks for your reply to this query. The error msg is: The service has encountered an error while checking the health of the Streamlit app: Get 鈥http://localhost:8501/healthz鈥: dial tcp IPAddress:8501: connect: connection refused

The problem is becasue of the config.toml file that I copied from the tutorial. For unknown reason I鈥檝e not figured out, it will cause connection refusal. I still have no time to check which part of the config.toml causes this problem. Thanks ~

Hi Caroline, sorry to bother you again. I meet a new issue of the same program.
The execution has no error message, however, the web-version fails to generate an excel file, but the local version has no problem with that. I leave the config.toml empty.

The link to the program is
https://carolinedlu-tova-tova-0483p4.streamlit.app/
or
https://dwleeibru-tova-tova-ecdi8g.streamlit.app/

The link of github is

Any suggetion is appreciated

If there is no error message, what makes you think that the app 鈥渇ails to generate an excel file鈥?