# All ports in use

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%3E%5C
**Category:** Beginners\
**Created:** [August 10, 2022, 12:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477 "2022-08-10T12:51:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neslihan](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Neslihan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FNeslihan)%5C
**Post date:** [August 10, 2022, 12:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F1 "2022-08-10T12:51:19Z")

</div>

Hello everyone!

I’ve been getting “OSError: All ports from 7860 to 7861 are in use. Please close a port.” this error while using space. Is there any suggestion to fix the problem?

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmerve)%5C
**Post date:** [August 10, 2022, 1:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F2 "2022-08-10T13:05:03Z")

</div>

Hello @Neslihan, nice to see you around here 🤗

It’s good to restart a Space from the settings. (I restarted it for you, it works but you have a `SyntaxError` from what I see)

All the best,  
Merve

---

<div class="post-metadata">

**Author:** ![Neslihan](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Neslihan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FNeslihan)%5C
**Post date:** [August 10, 2022, 1:12pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F3 "2022-08-10T13:12:26Z")

</div>

Thank you @merve 😊 🤗

I’ve corrected the SyntaxError. The current version is working perfectly on my local machine. I’ve also restarted the space after the correction. But I’m still getting the same error. I might be using gradio-launch wrongly. I will check the documentation.

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmerve)%5C
**Post date:** [August 10, 2022, 1:14pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F4 "2022-08-10T13:14:29Z")

</div>

@Neslihan I did another factory reset and I got the error again, I’m checking with the Spaces team to solve your problem. Thanks a lot for your patience ❤

---

<div class="post-metadata">

**Author:** ![Neslihan](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Neslihan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FNeslihan)%5C
**Post date:** [August 10, 2022, 1:17pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F5 "2022-08-10T13:17:13Z")

</div>

Thank you @merve  
(and big thanks for introducing huggingface to us 🤗 )

---

<div class="post-metadata">

**Author:** ![merve](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/merve/32/49809_2.png) [@merve](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fmerve)%5C
**Post date:** [August 10, 2022, 1:20pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F6 "2022-08-10T13:20:45Z")

</div>

Hello Neslihan,

You set the SDK to streamlit but it should be gradio, I opened a pull request to your Space’s repository.

---

<div class="post-metadata">

**Author:** ![Neslihan](https://avatars.discourse-cdn.com/v4/letter/n/b9e5f3/32.png) [@Neslihan](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FNeslihan)%5C
**Post date:** [August 10, 2022, 1:35pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F7 "2022-08-10T13:35:52Z")

</div>

I merged your pull request and additionally changed the SDK version. It’s working now, thank you @merve 😊

---

<div class="post-metadata">

**Author:** ![zepef](https://avatars.discourse-cdn.com/v4/letter/z/4491bb/32.png) [@zepef](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fzepef)%5C
**Post date:** [February 4, 2024, 4:34am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fall-ports-in-use%2F21477%2F8 "2024-02-04T04:34:15Z")

</div>

Hello,

I am facing the same port problem. I have restarted my Space, changed ports and checked SDK. What is weird is that the problem is appearing even when I reverted to previous versions of my app. I even removed the Space and recreated it again. First time app was ok but as soon as I added a new tab for RAG using HuggingFacesInstructEmbeddings I ran into the error again.

Do you have any idea?

All the best,

Pierre-Emmanuel
