After some slight changes, Node-Red doen't start anymore. "Service name is already in use on the network"

Hi,

I did some slight changes

a) making two switch-entities become light-entities
b) deleted devices in home (on an apple-device)

the reasons were the following;

to a)
because the two are smartplugs with lights behind it, so I wanted them to react on commands to the domain “light”. HAss told me during the change, that the original “switch.” entity will be hidden, and only the new “light.”-entity will show up in the entity-list. Seems fine to me.

to b)
I had a lot of devices in HomeKit already, when I started with Homeassistant 2 weeks ago. When I added home bridge to HAss, nearly all devices were doubled in HomeKit. So I tried and deleted one of a double (and I am afraid, it was the wrong one, one with a serial number from Node-Red).

The other day Node-Red-AddOn was stopped, and since then I get the following error in the Node-Red-Log:

6 Jul 13:03:01 - [red] Uncaught Exception:
6 Jul 13:03:01 - [error] Error: Service name is already in use on the network
    at Registry._onProbeComplete (/config/node_modules/bonjour-hap/lib/Registry.js:108:27)
    at Prober.done (/config/node_modules/bonjour-hap/lib/Prober.js:67:10)
    at Prober.onMDNSresponse (/config/node_modules/bonjour-hap/lib/Prober.js:61:102)
    at EventEmitter.emit (node:events:517:28)
    at Socket.<anonymous> (/config/node_modules/multicast-dns/index.js:49:43)
    at Socket.emit (node:events:517:28)
    at UDP.onMessage (node:dgram:942:8)
[13:03:01] INFO: Service Node-RED exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping

I tried already several restarts; whole system, only Homeassistant, only AddOn.
I checked configuration of Node-Red (although I didn’t change anything in there before the issue occurred).
I always see the normal startup-sequence of NR in the Log, until this lines above appear, and every service stops again afterwards.

I can see, that “bonjour-hap” seems to cause an issue, but I don’t know, how to handle it. Can anybody guide me through this?

Do you have any homebridge/homekit nodes installed? If yes start in safe mode(switch in the config page of the addon) and remove them and restart. I found this old issue with homebridge that pretty much reads line for line. If this is resulting from 3rd party nodes look for updated versions.

1 Like

I was afraid somebody would say that :wink:

I have a home bridge-node, and I use a lot of nodes with it. But anyway, I already thought, that this might happen.

I looked for the error message, but I didn’t find your linked entry. Thanks for sharing it.

I go on tomorrow with deleting the home bridge stuff (also from my HomeKit, Device for Device :frowning: )

I keep you updated here…

Look for the nodes page on git or npm and look in the issues section if anyone else is experiencing this.

1 Like

I had a look over all issues and did a search for the relevant data, but found nothing so far.
But that might be related to the fact, that I caused the situation by myself, so there is nothing like an issue with the software :wink:

Since I couldn’t start Node-Red (NR) anymore because of this error …

… I couldn’t remove the causing palette from NR. That also means, that I had no chance to remove it from the add-on-config page, because I chose the “palette” way within Node-Red.

But there was another way to get rid of the bad node; I downloaded the “flows.json” from my Yellow, opened it in “VS Code”, searched for “bonjour-hap”, and found two nodes with that same advertiser.

This advertiser seems to be the relevant information, that caused the error during Node-Red startup. After removing one of the entries out of the file, and copying it back to the yellow, NR started without error. Yeah.

I don’t know, why this became an issue out of nothing, but I guess it is related to some exporting/importing from the “old” Raspi to the new Yellow (I am migrating my smarthome to the new Yellow actually). So when I imported one or some nodes from the old to the new system, there might have been a reference to the old node-entry traveling with the copied data. But just a guess, I will do some more investigating on this later.

Thanks for giving me the push, @Mikefila, the idea with CS Code came after your answer - beforehand I wanted to avoid the code-digging, but I saw a bit clearer after you taking the lead here (I know, you didn’t :wink: ).

I hope, this thread can help others with the same problem. To make it easier to be found, I repeat the error message here, and also change the title of this thread.

“Service name is already in use on the network”

2 Likes

This is how the json code looked like with the error. I removed the second block, this one came with an export/import of nodes from the old system.