# Gradio spaces app ConnectTimeoutError

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-spaces-app-connecttimeouterror%2F37555%3E%5C
**Category:** Spaces\
**Created:** [April 24, 2023, 8:03am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-spaces-app-connecttimeouterror%2F37555 "2023-04-24T08:03:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lykeven](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@lykeven](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flykeven)%5C
**Post date:** [April 24, 2023, 8:03am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-spaces-app-connecttimeouterror%2F37555%2F1 "2023-04-24T08:03:46Z")

</div>

Hi, my gradio app is working well locally but not when deployed on spaces. I got a ConnectTimeoutError：

 ![20230424-164436](https://us1.discourse-cdn.com/hellohellohello/original/2X/5/5e8e73f0fa4b07e170a50874549378c9aa5b46e0.png)  
It seems like It can not connect to our model server, which connects to the internet normally. I don’t know whether I set the launch configuration right. I have tried `launch()` or `launch(debug=True, server_name='0.0.0.0', server_port=7860)`, but none of this worked.  
Can someone help me fix this. I appreciate your feedbacks.

---

<div class="post-metadata">

**Author:** ![freddyaboulton](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/freddyaboulton/32/32732_2.png) [@freddyaboulton](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Ffreddyaboulton)%5C
**Post date:** [April 24, 2023, 2:16pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-spaces-app-connecttimeouterror%2F37555%2F2 "2023-04-24T14:16:35Z")

</div>

Hi @lykeven - requests to ports other than 80, 443 and 8080 are blocked ([Spaces Overview](https://huggingface.co/docs/hub/spaces-overview#networking)) in spaces

---

<div class="post-metadata">

**Author:** ![lykeven](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@lykeven](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flykeven)%5C
**Post date:** [April 25, 2023, 7:43am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-spaces-app-connecttimeouterror%2F37555%2F3 "2023-04-25T07:43:24Z")

</div>

@freddyaboulton Thanks for your kind response. Although I find that change port to 80 or 8080 didn’t work either.  
The gradio app report Permission denied when I use 80:

 ![5zRvas8go9](https://us1.discourse-cdn.com/hellohellohello/original/2X/a/a1d4e4f2a8fe073444246652c9831e1d6dcd2625.jpeg)  
And the app keep building all the time when I use 8080.

---

<div class="post-metadata">

**Author:** ![lykeven](https://avatars.discourse-cdn.com/v4/letter/l/258eb7/32.png) [@lykeven](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Flykeven)%5C
**Post date:** [April 25, 2023, 8:48am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgradio-spaces-app-connecttimeouterror%2F37555%2F4 "2023-04-25T08:48:15Z")

</div>

ohh，I get this. It means our model server should open the http port 8080 other than space gradio port.
