igdr / node-red-contrib-xiaomi-smart-devices

8 stars 4 forks source link

502 error on Deploy #36

Open domnich opened 4 years ago

domnich commented 4 years ago

Hi there! I'm a noob with node red...Anyway, after plugin was added into my Home Assistant Node Red and after I added my first Xiaomi Gateway instance into node red greed on deploy click I see an 502 error and my node red wont work anymore...

https://prnt.sc/qdsbo7

Any ideas ?

RezzZ commented 4 years ago

same here, need to remove the gateway from my new flow and restart nodered to work again. running nodered-12 1.0.3 on centos8 using docker... instant crash on deploy with an empty flow containing just a gateway that I gave a name (empty configuration). hope this can be resolved. going to try other/older packages

tshirtnjeans commented 4 years ago

This happened to me right after I set up the gateway. The gateway uses port 9898. Logs show error due to 9898 already being in use.

Welcome to Node-RED
===================
29 Apr 14:13:08 - [info] Node-RED version: v1.0.5
29 Apr 14:13:08 - [info] Node.js  version: v12.15.0
29 Apr 14:13:08 - [info] Linux 4.15.0-96-generic x64 LE
29 Apr 14:13:08 - [info] Loading palette nodes
29 Apr 14:13:09 - [info] Dashboard version 2.20.0 started at /endpoint/ui
29 Apr 14:13:09 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
29 Apr 14:13:09 - [info] Settings file  : /etc/node-red/config.js
29 Apr 14:13:09 - [info] Context store  : 'default' [module=memory]
29 Apr 14:13:09 - [info] User directory : /config/node-red/
29 Apr 14:13:09 - [warn] Projects disabled : editorTheme.projects.enabled=false
29 Apr 14:13:09 - [info] Flows file     : /config/node-red/flows.json
29 Apr 14:13:09 - [info] Server now running at http://127.0.0.1:46836/
29 Apr 14:13:09 - [info] Starting flows
29 Apr 14:13:09 - [info] Started flows
29 Apr 14:13:09 - [red] Uncaught Exception:
29 Apr 14:13:09 - Error: bind EADDRINUSE 0.0.0.0:9898
    at dgram.js:334:20
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
ERR! ERR!   ERR!     /root/.npm/_logs/2020-04-29T18_13_09_974Z-debug.log
> addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"`
RezzZ commented 4 years ago

for me the issue probably was that I had several dockers running on the same machine. I believe homeassistant was also using the port to listen to xiaomi events. I already moved all xiaomi devices to deconz with a combee2 stick. I now only need to access the gateways for certain automations so I can remove the integration for xiaomi in homeassisant and use it via nodered.