# MediaSoupError: port bind failed due to address not available \[udp:1.2.3.4, attempt:1\]

**URL:** <https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32>\
**Category:** mediasoup-demo\
**Created:** [May 28, 2019, 6:48pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32 "2019-05-28T18:48:13Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/frank/32/24_2.png) [@Frank](https://mediasoup.discourse.group/u/Frank)\
**Post date:** [May 28, 2019, 6:48pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/1 "2019-05-28T18:48:13Z")

</div>

Hi,  
I have installed the client and server packages. When I deployed me the following error in the chrome console:

_mediasoup-demo:ERROR:RoomClient \_joinRoom() failed:Error: 500_  
_at Peer.\_handleResponse (:3000/mediasoup-demo-app.js?v=foo:47251)_  
_at WebSocketTransport. (:3000/mediasoup-demo-app.js?v=foo:47183)_  
_at emitOne (:3000/mediasoup-demo-app.js?v=foo:27275)_  
_at WebSocketTransport.emit (:3000/mediasoup-demo-app.js?v=foo:27353)_  
_at WebSocketTransport.safeEmit (:3000/mediasoup-demo-app.js?v=foo:35892)_  
_at WebSocket.\_ws.onmessage (:3000/mediasoup-demo-app.js?v=foo:47498) +0ms_  
_debug @ :3000/mediasoup-demo-app.js?v=foo:29961_

And on the server side:

_mediasoup:ERROR:worker[pid:6571] RTC::PortManager::Bind() | throwing MediaSoupError: port bind failed due to address not available [udp:1.2.3.4, attempt:1] +0ms_  
_mediasoup:WARN:Channel[pid:6571] request failed [method:router.createWebRtcTransport, id:3]: port bind failed due to address not available [udp:1.2.3.4, attempt:1] +0ms_  
_mediasoup-demo-server:ERROR:Room request failed:Error: port bind failed due to address not available [udp:1.2.3.4, attempt:1] at Channel.\_processMessage (/home/franklonchas/Documentos/mediasoup-demo/server/node\_modules/mediasoup/lib/Channel.js:284:19) at Socket.Channel.\_socket.on (/home/franklonchas/Documentos/mediasoup-demo/server/node\_modules/mediasoup/lib/Channel.js:101:13) at emitOne (events.js:116:13) at Socket.emit (events.js:211:7) at addChunk (\_stream\_readable.js:263:12) at readableAddChunk (\_stream\_readable.js:250:11) at Socket.Readable.push (\_stream\_readable.js:208:10) at Pipe.onread (net.js:607:20) +5m_  
_mediasoup-demo-server:Room protoo Peer “close” event [peerId:fiyi4xnm] +18ms_

Any ideas to solve this and be able to start working with the demo?  
Thanks for the attention, a greeting! 😃

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 28, 2019, 7:11pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/2 "2019-05-28T19:11:07Z")

</div>

> [@Frank](#):
>
> throwing MediaSoupError: port bind failed due to address not available [udp:1.2.3.4, attempt:1

That log look interesting, right? Does your host have IP 1.2.3.4?

---

<div class="post-metadata">

**Author:** ![Frank](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/frank/32/24_2.png) [@Frank](https://mediasoup.discourse.group/u/Frank)\
**Post date:** [May 28, 2019, 7:49pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/3 "2019-05-28T19:49:56Z")

</div>

Oh wow, thats nice, i change it for localhost and work!!!

Thanks a lot!!

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 28, 2019, 7:57pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/4 "2019-05-28T19:57:16Z")

</div>

🙂

BTW it’s extremely important that you focus on the mediasoup API documentation instead of relying on the demo application.

---

<div class="post-metadata">

**Author:** ![Frank](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/frank/32/24_2.png) [@Frank](https://mediasoup.discourse.group/u/Frank)\
**Post date:** [May 28, 2019, 7:59pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/5 "2019-05-28T19:59:27Z")

</div>

You are right but nevertheless it is something complicated to understand, for me.  
I will make an effort to understand it better.  
One more question, when I put two or more clients in the same room, they see each other but I can not see or hear anything. Why is this ??

I do not see any errors in the console

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 28, 2019, 8:22pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/6 "2019-05-28T20:22:39Z")

</div>

I don’t know where and how you are deploying the demo application. If you are running the Node.js application in a separate server and use “127.0.0.1” as WebRTC transport listen IP, for sure clients won’t be able to connect at media level.

---

<div class="post-metadata">

**Author:** ![Frank](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/frank/32/24_2.png) [@Frank](https://mediasoup.discourse.group/u/Frank)\
**Post date:** [May 28, 2019, 9:02pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/7 "2019-05-28T21:02:42Z")

</div>

I installed the app as you say, and then change the ip to 127.0.0.1, I do not know if I should change / add something

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 28, 2019, 11:46pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/8 "2019-05-28T23:46:36Z")

</div>

You have not clarified whether you have installed the mediasoup-demo server in a separate host or in the same host in which you run the browsers.

---

<div class="post-metadata">

**Author:** ![Frank](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/frank/32/24_2.png) [@Frank](https://mediasoup.discourse.group/u/Frank)\
**Post date:** [May 29, 2019, 9:29am UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/9 "2019-05-29T09:29:31Z")

</div>

I have it installed on my PC in a normal way, on the same host, when I get in from the same PC I can see and hear the other clients, when I try from the phone, I see the connected client but I do not see or receive anything from the .

And apparently I do not have any errors in the 2 consoles.

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 29, 2019, 9:49am UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/10 "2019-05-29T09:49:58Z")

</div>

How do you expect a mobile to connect to 127.0.0.1 in a different host?

At some point reading the doc is necessary:

> **[mediasoup :: API](https://mediasoup.org/documentation/v3/mediasoup/api/#router-createWebRtcTransport)**
>
> Cutting Edge WebRTC Video Conferencing

---

<div class="post-metadata">

**Author:** ![Frank](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/frank/32/24_2.png) [@Frank](https://mediasoup.discourse.group/u/Frank)\
**Post date:** [May 30, 2019, 1:11pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/11 "2019-05-30T13:11:58Z")

</div>

Now that I think about it, it sounds logical. Looking at the documentation that has happened to me, we must put the address such that -\> listenIps: [{ip: “192.168.0.111”, previouslyIp: “88.12.10.41”}]

the first ip would be the one of the server in local and the second the ip publish true?

One more question, to put it in deploy the example that more would be necessary? Is it referenced in the documentation? To be more accurate, my need at this time is to put the project that you have in production as an example, in production on another server of mine.

I would like to know how to do it step by step, really its API is complex and it is difficult for me to understand things like what to do with the client, and server to put it into production.

Thank you very much for the inconvenience of answering my questions.

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 30, 2019, 1:30pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/12 "2019-05-30T13:30:57Z")

</div>

I’m afraid I cannot provide step by step instructions to get the demo application running in a server. That’s not the purpose of this forum and I prefer to spend time giving free support about mediasoup itself. The demo app is just a demo, not a full application or product for anyone to deploy at it is.

---

<div class="post-metadata">

**Author:** ![Frank](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/frank/32/24_2.png) [@Frank](https://mediasoup.discourse.group/u/Frank)\
**Post date:** [May 30, 2019, 1:55pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/13 "2019-05-30T13:55:53Z")

</div>

Ok, i understand it. Any docs or video for that?  
And can you response me to the “listenIps” please??

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [May 30, 2019, 2:10pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/14 "2019-05-30T14:10:39Z")

</div>

No, there is no docs or video about how to deploy the demo app (other than the instructions in the README).

The listenIps setting is explained in the doc:

> **[mediasoup :: API](https://mediasoup.org/documentation/v3/mediasoup/api/#WebRtcTransportOptions)**
>
> Cutting Edge WebRTC Video Conferencing

> **[mediasoup :: F.A.Q.](https://mediasoup.org/faq/#running-mediasoup-in-hosts-with-private-ip)**
>
> Cutting Edge WebRTC Video Conferencing

---

<div class="post-metadata">

**Author:** ![ibc](https://yyz2.discourse-cdn.com/free1/user_avatar/mediasoup.discourse.group/ibc/32/1540_2.png) [@ibc](https://mediasoup.discourse.group/u/ibc)\
**Post date:** [December 2, 2019, 11:10pm UTC](https://mediasoup.discourse.group/t/mediasouperror-port-bind-failed-due-to-address-not-available-udp-1-2-3-4-attempt-1/32/15 "2019-12-02T23:10:46Z")

</div>


