i am getting the following message whenever i try to open my node-red inside my raspberry pi

i am getting the following message whenever i try to open my node-red inside my raspberry pi

6 Nov 03:39:52 - [info] [udp out:8a2aee6c.3c7c6] udp ready: 0.0.0.0:5005

6 Nov 03:39:52 - [info] [udp out:15b7225d.69ed5e] udp re-use socket: -> 0.0.0.0:5005

6 Nov 03:39:52 - [red] Uncaught Exception:

6 Nov 03:39:52 - Error: setBroadcast EBADF

at Socket.setBroadcast (dgram.js:770:11)

at Timeout._onTimeout (/usr/lib/node_modules/node-red/node_modules/@node-red/nodes/core/network/32-udp.js:184:26)

at listOnTimeout (internal/timers.js:554:17)

at processTimers (internal/timers.js:497:7)

initially it opened once and i created certain nodes for udp data transfer after i deployed it, it terminated the node-red connection and since then whenever i try to open node-red the above quoted message comes up any help will be appriciated

thank you

restart Node-RED manually from the command line with the --safe option added - this will start it without running the flow which will allow you to edit out the offending udp node.
If possible grab a screen shot of how you have that configured as we shouldn't break like that so I'd like to know how you have it configured.

1 Like

Thank you for your response
my flow looks like this

i have the same flow tested on my ubuntu and windows OS but the problem occurs in raspbian in the pi

Can you try just having one UDP out port and wiring all three flows to that one instance.

1 Like

thank you for the reply i tried what you asked
but the result was same as before the same error occurred.
i would also like to add that during this time i tried using the same flow with ip of my other pi
so the upd receiving program was on my other pi and it worked fine but the moment i changed the ip to localhost the same error occurred again and it made me wonder if it is due to some architectural drawback of raspberry pi as it was fine with windows OS and Ubuntu in my personal system but i found nothing related to it on the internet so far

rather than 0.0.0.0 can you use the actual broadcast address for your subnet ?

1 Like

i tried using my broadcast ip this time around as suggested, and it got deployed at first without any problem but the moment i started the upd program to receive data the same error came and node-red got disconnected

So are you using UDP nodes to perform data transfer between 2 node-red on raspberry pis?

If so, Is there any reason you didn't use something much easier like MQTT?

1 Like

Both the pis don't have node red
The other Pi has a program that recieves the data based on some security parameter that will be applied once this gets done

You are right that using mqtt would have been much easier but mqtt uses TCP that requires acknowledgment whereas UDP don't

So data transfer will be faster in upd based backend

While it's also true that mqtt-sn can be used for UDP or other protocols so I won't say I thought of it and it was thanks to you that I realised I can use that :grin:

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.