# Node-red does not work -bind address

**URL:** <https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233>\
**Category:** General\
**Created:** [25 January 2019 07:59 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233 "2019-01-25T07:59:42Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [25 January 2019 07:59 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/1 "2019-01-25T07:59:42Z")

</div>

I run CoAP server (txthing) in raspberry pi, this server works on 0.0.0.0:5683  
and I run node-red in the same device. when I run both at the same time, .. node-red doesnt work and there is error in the log  
"Error:bind EADDRINUSE 0.0.0.0:5683"  
at object.\_errorExeption (util.js:1022:11)

when I close CoAP server, node-red returns back to work

maybe I an not too strong in networks, but I don't know why this error if each one works in different port...  
could you help me, please?

Thanks

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 January 2019 08:46 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/2 "2019-01-25T08:46:56Z")

</div>

Can you post the full log you get when you start node-red with CoAP running? You can run

```bash
node-red-stop
node-red-start

```

to see it.

**[Edit]** Also what node are you using to communicate with CoAP?

---

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [25 January 2019 21:55 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/3 "2019-01-25T21:55:48Z")

</div>

I don't use any node to connect CoAP server, but I run it to connect with client in another device. I did this as there is no node for CoAP response (server) in node red. so, I just run CoAP server in the same device with node-red

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 January 2019 21:59 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/4 "2019-01-25T21:59:51Z")

</div>

OK, we need to see the log then to see why node red is listening on the CoAP port.

---

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [25 January 2019 22:08 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/5 "2019-01-25T22:08:46Z")

</div>

this surprised me, I can't understand why?  
I will post the log when I go back to my office in the university at the beginning of week. thanks for your concern.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [25 January 2019 22:14 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/6 "2019-01-25T22:14:30Z")

</div>

Have you installed node-red-contrib-coap? I am not sure what it does but I suspect it might listen on that port.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [26 January 2019 02:04 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/7 "2019-01-26T02:04:47Z")

</div>

Am I missing something

Are you trying to run node red on the same port as this "CoAP server"

I'm not certain what that is or if it opens a port on 5683 but if it does and you're trying to run node-red on the same port (or any other application that requires a TCP port) it will fail.

As a test, run node red on the default port 1880. See if you can connect to it in your browser [http://ipaddress:1880](http://ipaddress:1880) & tell us how that goes.

---

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [28 January 2019 23:57 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/8 "2019-01-28T23:57:37Z")

</div>

Thank guys,  
I know that node-red listen by default to 1880, and I don't want to change it. further, I have not changed any thing in settings.js.

At the beginning, I installed node-red-contrib-coap to try it then I deleted it.  
after that, I installed CoAP server (txthing) and I worked with it, when I run node-red at the same time .. it shows error in the log like this ...  
[info] Starting flows  
29 Jan 09:24:25 - [info] Started flows  
29 Jan 09:24:25 - [red] Uncaught Exception:  
29 Jan 09:24:25 - Error: bind EADDRINUSE 0.0.0.0:5683

at Object.\_errnoException (util.js:1022:11)  
nodered.service: Main process exited, code=exited, status=1/FAILURE  
nodered.service: Unit entered failed state.  
nodered.service: Failed with result 'exit-code'.  
nodered.service: Service hold-off time over, scheduling restart.  
Stopped Node-RED graphical event wiring tool.  
Started Node-RED graphical event wiring tool.  
29 Jan 09:24:30 - [info]  
Welcome to Node-RED

when I executed this command ...

netstat -punta |grep 5683

udp 0 0 0.0.0.0:5683 0.0.0.0:\* 1037/node-red  
and I did it again after reboot  
udp 0 0 0.0.0.0:5683 0.0.0.0:\* 1186/node-red

could you help me to know what is the problem?

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 January 2019 00:01 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/9 "2019-01-29T00:01:27Z")

</div>

that would indicate that the coap node (probably) was not uninstalled and is still present and running in Node-RED (and grabbing the port). Try looking in your `~/.node-red/node_modules` directory and see if it's there still.

---

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [29 January 2019 00:12 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/10 "2019-01-29T00:12:47Z")

</div>

I have this in the directory  
better -assert .................... node-red-contrib-coap  
coap .................. ... nofilter  
coap-packet .................. oauth-sign

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [29 January 2019 00:17 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/11 "2019-01-29T00:17:33Z")

</div>

so yes - you didn't manage to uninstall it.  
You should be able to run

```
npm uninstall node-red-contrib-coap

```

from the `~/.node-red/ directory to remove it. thne stop and restart Node-RED.  
Worst case you can just delete the three coap related directories manually.

---

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [29 January 2019 00:37 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/12 "2019-01-29T00:37:01Z")

</div>

I did it, however when I restart it.... it shows waiting coap-server ..  
and I cant deploy it, it shows  
flow stopped due to missing node-types  
coap-server

I checked all my flows, I dont have any coap node....  
and what is coap-server?!

---

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [29 January 2019 01:04 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/13 "2019-01-29T01:04:27Z")

</div>

I have just known the error, I deleted all unused nodes in the configure node, and after that everything works . NR and coap server work at the same time...  
and I think this is the reason for all my problems with proxy as well, I will check it again...

thanks a lot for you..  
you make my day 🙂

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 January 2019 09:25 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/14 "2019-01-29T09:25:33Z")

</div>

In an earlier post you said:

> [@manal](#):
>
> as there is no node for CoAP response (server) in node red.

So you are using a separate CoAP server as there is no node-red node that supports this. The problems you have found seem to suggest that the CoAP node does indeed provide a CoAP server.

---

<div class="post-metadata">

**Author:** ![manal](https://avatars.discourse-cdn.com/v4/letter/m/54ee81/32.png) [@manal](https://discourse.nodered.org/u/manal)\
**Post date:** [29 January 2019 10:22 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/15 "2019-01-29T10:22:21Z")

</div>

Actually, If I got your talk correctly, my answer would be:  
I surprised when NR log showed there is coap server error. As I tried use coap node in NR.. it send only request not response. So that means it is not server,  
As I worked with separate coap, the client sent request( e.g, get) and server respond and send ACk as well in case of conf message.  
I have not found any node for coap server in node-red, although I installed all the available nodes and tried it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [29 January 2019 10:45 UTC](https://discourse.nodered.org/t/node-red-does-not-work-bind-address/7233/16 "2019-01-29T10:45:30Z")

</div>

According to the readme for Coap In node included in that package it should operate as a server.  
Did you see the examples installed with the node? Particularly [https://github.com/reederz/node-red-contrib-coap/blob/master/examples/server\_flow.json](https://github.com/reederz/node-red-contrib-coap/blob/master/examples/server_flow.json)  
However, I have not used it, just looked at the readme.
