Error: listen EADDRNOTAVAIL: address not available 1.1.1.1:10502

#1

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 !

0 Likes

#2

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

0 Likes

#3

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

0 Likes

#4

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.

0 Likes

#5

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/
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)

0 Likes

#6

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.

0 Likes

#7

node: modbus-server

0 Likes

#8

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

0 Likes

#9

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.

0 Likes

#10

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

0 Likes

#11

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.

0 Likes

#12

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

0 Likes