hassio-addons/addon-node-red














The issue has been closed
Error binding port 5353 (multicast DNS) #562
buekera posted onGitHub
Problem/Motivation
I'd like to run Node-RED as an addon to Home Assistant but get an error when trying to start.
Expected behavior
Node-RED should start it's docker container successfully.
Actual behavior
Throwing error:
> addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
9 May 15:25:09 - [info]
Welcome to Node-RED
===================
9 May 15:25:09 - [info] Node-RED version: v1.0.5
9 May 15:25:09 - [info] Node.js version: v12.15.0
9 May 15:25:09 - [info] Linux 4.15.0-88-generic x64 LE
9 May 15:25:09 - [info] Loading palette nodes
9 May 15:25:10 - [info] Dashboard version 2.20.0 started at /endpoint/ui
Traceback (most recent call last):
File "/opt/node_modules/node-red-node-pi-gpio/testgpio.py", line 4, in <module>
import RPi.GPIO as GPIO
File "/usr/lib/python2.7/site-packages/RPi/GPIO/__init__.py", line 23, in <module>
from RPi._GPIO import *
RuntimeError: This module can only be run on a Raspberry Pi!
9 May 15:25:10 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
9 May 15:25:10 - [red] Uncaught Exception:
9 May 15:25:10 - Error: bind EADDRINUSE 0.0.0.0:5353
at dgram.js:334:20
at processTicksAndRejections (internal/process/task_queues.js:82:21)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! addon-node-red@ start: `node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the addon-node-red@ start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-05-09T13_25_10_984Z-debug.log
I think the RPi error can be ignored here.
The interesting part is Error: bind EADDRINUSE 0.0.0.0:5353
Steps to reproduce
Installed Home Assistant as supervised on Ubuntu machine with machine flag qemux86_64
. This installation makes use of docker.
docker ps
output:
ae62fc380446 homeassistant/amd64-hassio-supervisor "/init" 18 hours ago Up 18 hours hassio_supervisor
ad7f9fc81af7 homeassistant/qemux86-64-homeassistant:0.109.4 "/init" 3 days ago Up 39 hours homeassistant
b9cc48fefb75 homeassistant/amd64-hassio-dns:9 "/init coredns -confβ¦" 4 days ago Up 18 hours hassio_dns
96ba76f1784f homeassistant/amd64-hassio-audio:14 "/init" 4 days ago Up 4 days hassio_audio
1a82131bb8eb homeassistant/amd64-hassio-cli:25 "/init /bin/bash -c β¦" 4 days ago Up 4 days hassio_cli
dd7c6d9c19c2 homeassistant/amd64-hassio-multicast:2 "/init" 4 days ago Up 18 hours hassio_multicast
You can see hass.io is already running some sort of multicast which maybe causes the bind on port 5353. Why Node-RED needs to bind port 5353 eludes my knowledge.
Proposed changes
Disable multicast/port 5353 binding on Node-RED?
Maybe someone can tell my why this is needed.
I'm thankful for any hint.