# Error: listen EADDRNOTAVAIL: address not available 1.1.1.1:10502

**URL:** https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627
**Category:** General
**Created:** [5 February 2019 20:18 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627 "2019-02-05T20:18:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![eljuliman](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@eljuliman](https://discourse.nodered.org/u/eljuliman)
#### Post date: [5 February 2019 20:18 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/1 "2019-02-05T20:18:36Z")

</div>

Hello ! I have been working with modbus node red, and I configured a Server TCP in ip address 1.1.1.1:10502. When I have tried run node-red I have received this message  
5 Feb 21:10:07 - Error: listen EADDRNOTAVAIL: address not available 1.1.1.1:10502  
at Server.setupListenHandle [as \_listen2] (net.js:1260:19)  
at listenInCluster (net.js:1325:12)  
at doListen (net.js:1458:7)  
at process.\_tickCallback (internal/process/next\_tick.js:63:19)

I am looking for this port with netstat and it's desapeer, I'm using MAC with 10.14 version  
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: [5 February 2019 21:09 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/2 "2019-02-05T21:09:01Z")

</div>

Can you show us how you have configured the tcp node?

---

<div class="post-metadata">

### Author: ![eljuliman](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@eljuliman](https://discourse.nodered.org/u/eljuliman)
#### Post date: [5 February 2019 21:36 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/3 "2019-02-05T21:36:01Z")

</div>

// the tcp port that the Node-RED web server is listening on  
uiPort: process.env.PORT || 1880,

---

<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: [5 February 2019 21:38 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/4 "2019-02-05T21:38:28Z")

</div>

Sorry, you have lost me, I thought you said you were using a TCP node. I think you need to explain a bit more what you are doing.

---

<div class="post-metadata">

### Author: ![eljuliman](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@eljuliman](https://discourse.nodered.org/u/eljuliman)
#### Post date: [5 February 2019 21:47 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/5 "2019-02-05T21:47:22Z")

</div>

I was using Node-red Modbus Sever, and I configured a node with ip 1.1.1.1 and port 10502. I closed node-red and when I am trying open now this message appear in terminal, and it doesn't run node-red.

5 Feb 22:47:09 - [info] Node-RED version: v0.17.5  
5 Feb 22:47:09 - [info] Node.js version: v10.15.1  
5 Feb 22:47:09 - [info] Darwin 18.0.0 x64 LE  
5 Feb 22:47:09 - [info] Loading palette nodes  
5 Feb 22:47:10 - [info] Dashboard version 2.13.2 started at /ui  
5 Feb 22:47:10 - [warn] ------------------------------------------------------  
5 Feb 22:47:10 - [warn] [rpi-gpio] Info : Ignoring Raspberry Pi specific node  
5 Feb 22:47:10 - [warn] [azureiothubnode] Error: azureiothub already registered (line:146)  
5 Feb 22:47:10 - [warn] ------------------------------------------------------  
5 Feb 22:47:10 - [info] Settings file : /Users/jmlejarza/.node-red/settings.js  
5 Feb 22:47:10 - [info] User directory : /Users/jmlejarza/.node-red  
5 Feb 22:47:10 - [info] Flows file : /Users/jmlejarza/.node-red/flows\_MacBook-Pro-de-Julen.local.json  
5 Feb 22:47:10 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/)  
5 Feb 22:47:10 - [info] Starting flows  
5 Feb 22:47:10 - [info] Started flows  
5 Feb 22:47:10 - [red] Uncaught Exception:  
5 Feb 22:47:10 - Error: listen EADDRNOTAVAIL: address not available 1.1.1.1:10502  
at Server.setupListenHandle [as \_listen2] (net.js:1260:19)  
at listenInCluster (net.js:1325:12)  
at doListen (net.js:1458:7)  
at process.\_tickCallback (internal/process/next\_tick.js:63:19)

---

<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: [5 February 2019 21:49 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/6 "2019-02-05T21:49:21Z")

</div>

Which node are you using please? Probably node-red-contrib-something. I cant see one in the flows database that says it is a modbus server.

---

<div class="post-metadata">

### Author: ![eljuliman](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@eljuliman](https://discourse.nodered.org/u/eljuliman)
#### Post date: [5 February 2019 21:51 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/7 "2019-02-05T21:51:25Z")

</div>

> **[node-red-contrib-modbus](https://flows.nodered.org/node/node-red-contrib-modbus)**
>
> The all in one Modbus TCP and Serial contribution package for Node-RED.

node: modbus-server

---

<div class="post-metadata">

### Author: ![eljuliman](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@eljuliman](https://discourse.nodered.org/u/eljuliman)
#### Post date: [5 February 2019 21:52 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/8 "2019-02-05T21:52:30Z")

</div>

I have uninstalled node-red and reinstalled it, but the error persists

---

<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: [5 February 2019 21:57 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/9 "2019-02-05T21:57:35Z")

</div>

> [@eljuliman](#):
>
> I have uninstalled node-red and reinstalled it, but the error persists

That's not surprising if you have left the old flow file. I don't see in that node where it provides a modbus server.  
If you stop node-red, rename the flow file to something else (that's the file /Users/jmlejarza/.node-red/flows\_MacBook-Pro-de-Julen.local.json) and then restart node-red it will start with an empty flow.

---

<div class="post-metadata">

### Author: ![eljuliman](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@eljuliman](https://discourse.nodered.org/u/eljuliman)
#### Post date: [5 February 2019 22:07 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/10 "2019-02-05T22:07:41Z")

</div>

I don't find flow archives. How do I uninstall all node-red ?

---

<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: [5 February 2019 22:38 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/11 "2019-02-05T22:38:24Z")

</div>

Is your machine really on ip address 1.1.1.1 that's pretty unusual ?  
(and in fact is a well known DNS server on the internet...)  
If it's isn't then that's why it can't connect - as that is what you have asked it to connect to.

---

<div class="post-metadata">

### Author: ![eljuliman](https://avatars.discourse-cdn.com/v4/letter/e/c77e96/32.png) [@eljuliman](https://discourse.nodered.org/u/eljuliman)
#### Post date: [5 February 2019 22:46 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/12 "2019-02-05T22:46:09Z")

</div>

I have found flow archive and I have deleted it. It's running ! Thanks !

---

<div class="post-metadata">

### Author: ![Slawek](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Slawek](https://discourse.nodered.org/u/Slawek)
#### Post date: [24 April 2019 12:02 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/13 "2019-04-24T12:02:15Z")

</div>

Hi.  
I have similar error. Node-red doesn't work after configuring modbus, miss one number in adress... I didn't see in folder any file with flow configuration, but error still persist.

```auto
 Error: listen EADDRNOTAVAIL 12.0.0.1:11502
    at Server.setupListenHandle [as _listen2] (net.js:1343:19)
    at listenInCluster (net.js:1401:12)
    at doListen (net.js:1510:7)
    at _combinedTickCallback (internal/process/next_tick.js:142:11)
    at process._tickCallback (internal/process/next_tick.js:181:9)
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.

```

I don't know what to do now...  
Thanks for help!

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [24 April 2019 12:06 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/14 "2019-04-24T12:06:21Z")

</div>

You don't say what version of Node-RED you are running.

If you are on v0.20.x you can use the `--safe` flag on startup (see [https://nodered.org/blog/2019/03/12/version-0-20-released#runtime](https://nodered.org/blog/2019/03/12/version-0-20-released#runtime))

But the node you are using shouldn't crash Node-RED. You should open an issue with the nodes author so they can fix it. (follow a link to the nodes github page from the nodes page on [flows.nodered.org](http://flows.nodered.org))

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [24 April 2019 12:59 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/15 "2019-04-24T12:59:05Z")

</div>

> [@Slawek](#):
>
> but error still persist

I suggest this testing. Change the hostname in the modbus-server node to `localhost `, redeploy the flow and see what happens. As @ukmoose explained you will need to start Node-RED in safe node to recover from the crash.

---

<div class="post-metadata">

### Author: ![Slawek](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Slawek](https://discourse.nodered.org/u/Slawek)
#### Post date: [24 April 2019 14:07 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/16 "2019-04-24T14:07:33Z")

</div>

Thanks for reply.  
Version Node-RED I use is v0.19.4  
Working on RaspberryPi  
OK... i don't know what happend, but when I stop Node-RED, then start manually it's starts normally, but without any nodes, flow or install palletes. But when I reboot Raspberry, there is an error.  
I try remove Node-RED from systemctl service, to manually run it, bu effect is like previous (no flows, nodes...).

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [24 April 2019 14:15 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/17 "2019-04-24T14:15:04Z")

</div>

If you read the raspberry pi page in the docs [https://nodered.org/docs/hardware/raspberrypi](https://nodered.org/docs/hardware/raspberrypi)

it will show you how to stop the autorunning Node-RED.

If when you restart it has no flows what does the log say as to which flows file it is using?  
If you look in the directory ~/.node-red/ are there other files where the name ends with flows.json?

While you are reading the page you might as well upgrade to get the latest version...

---

<div class="post-metadata">

### Author: ![Slawek](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Slawek](https://discourse.nodered.org/u/Slawek)
#### Post date: [26 April 2019 12:56 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/18 "2019-04-26T12:56:21Z")

</div>

I update to latest version and now start without errors. But flows are empty... I need to make everything from the beginning.  
In home directory is only one file flow\*.json. Before update there was no files with flows.  
Thanks for help.

---

<div class="post-metadata">

### Author: ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)
#### Post date: [26 April 2019 13:06 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/19 "2019-04-26T13:06:49Z")

</div>

If the were no files before you updated then you must have been running Node-RED differently.

How did you run Node-RED? You flows files will be somewhere...

---

<div class="post-metadata">

### Author: ![Slawek](https://avatars.discourse-cdn.com/v4/letter/s/9d8465/32.png) [@Slawek](https://discourse.nodered.org/u/Slawek)
#### Post date: [26 April 2019 13:32 UTC](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627/20 "2019-04-26T13:32:34Z")

</div>

Node-RED was added to systemctl and it start with system. After wrong config I try to fix it, I stop a Node-RED, and run it manually, then flows on graphical editor was clear. When I looking for files in home directory, there was no flow files.

[Next page](https://discourse.nodered.org/t/error-listen-eaddrnotavail-address-not-available-1-1-1-1-10502/7627.md?page=2)
