My node red keep restarting and show 502 bad gateway on web ui

It’s keep restarting and web ui show “502 Bad Gateway nginx”
Flow inside my node-red including
1.Call state of entity
2.Capture mqtt from broker
3.Send data from hassio to influxdb
4.Some HTTP request
What make it restart loop like this
Thanks

[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 6.0.3
 You are running the latest version of this add-on.
 System: HassOS 3.8  (armv7 / raspberrypi3)
 Home Assistant version: 0.104.3
 Supervisor version: 195
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing... 
patching file nodes/ui_base.html
Hunk #1 succeeded at 1243 (offset 712 lines).
audited 72 packages in 3.966s
found 5 vulnerabilities (1 moderate, 4 high)
  run `npm audit fix` to fix them, or `npm audit` for details
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing... 
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[14:04:24] INFO: Starting Node-RED...
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
31 Jan 14:04:28 - [info] 
Welcome to Node-RED
===================
31 Jan 14:04:28 - [info] Node-RED version: v1.0.3
31 Jan 14:04:28 - [info] Node.js  version: v12.14.0
31 Jan 14:04:28 - [info] Linux 4.19.93-v7 arm LE
31 Jan 14:04:29 - [info] Loading palette nodes
31 Jan 14:04:37 - [info] Dashboard version 2.19.3 started at /endpoint/ui
31 Jan 14:04:38 - [info] Settings file  : /etc/node-red/config.js
31 Jan 14:04:38 - [info] Context store  : 'default' [module=memory]
31 Jan 14:04:38 - [info] User directory : /config/node-red/
31 Jan 14:04:38 - [warn] Projects disabled : editorTheme.projects.enabled=false
31 Jan 14:04:38 - [info] Flows file     : /config/node-red/flows.json
31 Jan 14:04:38 - [info] Server now running at http://127.0.0.1:46836/
31 Jan 14:04:38 - [info] Starting flows
[14:04:38] INFO: Starting NGinx...
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
31 Jan 14:04:40 - [error] [twitter out:Tweet] missing twitter credentials
31 Jan 14:04:40 - [info] Started flows
31 Jan 14:04:40 - [info] [mqtt-broker:a96e8f4a.34c398] Connected to broker: mqtt://192.168.1.7:1883
[14:04:43] INFO: Starting Node-RED...
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
31 Jan 14:04:46 - [info] 
Welcome to Node-RED
===================
31 Jan 14:04:46 - [info] Node-RED version: v1.0.3
31 Jan 14:04:46 - [info] Node.js  version: v12.14.0
31 Jan 14:04:46 - [info] Linux 4.19.93-v7 arm LE
31 Jan 14:04:47 - [info] Loading palette nodes
31 Jan 14:04:55 - [info] Dashboard version 2.19.3 started at /endpoint/ui
31 Jan 14:04:56 - [info] Settings file  : /etc/node-red/config.js
31 Jan 14:04:56 - [info] Context store  : 'default' [module=memory]
31 Jan 14:04:56 - [info] User directory : /config/node-red/
31 Jan 14:04:56 - [warn] Projects disabled : editorTheme.projects.enabled=false
31 Jan 14:04:56 - [info] Flows file     : /config/node-red/flows.json
31 Jan 14:04:56 - [info] Server now running at http://127.0.0.1:46836/
31 Jan 14:04:56 - [info] Starting flows
31 Jan 14:04:57 - [error] [twitter out:Tweet] missing twitter credentials
31 Jan 14:04:58 - [info] Started flows
31 Jan 14:04:58 - [info] [mqtt-broker:a96e8f4a.34c398] Connected to broker: mqtt://192.168.1.7:1883
[14:05:00] INFO: Starting Node-RED...
> hassio-addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
31 Jan 14:05:04 - [info] 
Welcome to Node-RED
===================
31 Jan 14:05:04 - [info] Node-RED version: v1.0.3
31 Jan 14:05:04 - [info] Node.js  version: v12.14.0
31 Jan 14:05:04 - [info] Linux 4.19.93-v7 arm LE
31 Jan 14:05:05 - [info] Loading palette nodes

o.O

Home assistant has support for that directly. You don’t need node red for that.

2 Likes

Most likely this. NodeRed doesn’t do well with error conditions and will restart often due to them. Remove the Twitter nodes from the flow or pallete and restarting NodeRed should help.

Now I fond the source of this error. Sorry I forget to tell you that I used FIrebase node before. That is the source of this error. When I try to connect my node-red with firebase. Just hit deploy. My node-red is down. 502 Bad Gateway shown on screen.

Even in node-red service standalone on my pc. Firebae node wiill make it error. 502 Bad Gateway ngnix and starting restart loop

Yes, but i don’t want to push all of data of hassio to my db. So i use node red for get some data and push. Thank you anyway:))

So use the includes/excludes feature of the integration??

1 Like