Deploy failed: connection refused

Yes, that’s 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:

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’s deployed here (I had to also add a missing package to the requirements file). I’m 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’t any funky characters

1 Like

Many many thanks. If I reboot from my end, will your be killed?

Nope, it’s a separate repo

1 Like

Yes, it’s solved after I delete the content of config.toml.
If I find out what’s wrong, I’ll 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?


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’ve 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

The link of github is

Any suggetion is appreciated

If there is no error message, what makes you think that the app “fails to generate an excel file”?

Hi Goyo, I’m new to streamlit. Not sure if I understand your reply.
So, you mean that a web-based app by streamlit does not allow generating a file due to safety reasons?
Or something else?
Best ~

I don’t mean anything like that, I am just asking you a question.

what makes you think that the app “fails to generate an excel file”?

Do you understand the question?

I dig into some discussion and found this:

Thanks Caroline, forget my request and thanks ~

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