All flows gone after restart of NR

Hi folks,
I ve no idea what happened. When I restart nr all flows are gone. No matter how often I deploy flows, changes or whatever -> after nr restart all the flows are gone.

What command do you use to restart node-red?

I use "node-red-start" and "node-red-stop" this worked fine in the past and I didn´t update / upgrade for 3 month or so.
The flows seems to exist as "flow_raspberrypi.json" and "flow_loacal.json" in the /.nod-red - dirrectory.
I changed the the settings.json some time ago to have a user login and password. But I am very sure it worked fine after these changes.... hmmm or am I wrong ?

Post the log you get when you start node-red

pi@raspberrypi:~/.node-red $ node-red-start

Start Node-RED
 
Once Node-RED has started, point a browser at http://192.168.0.60:1880
On Pi Node-RED works better with the Firefox or Chrome browser
 
Use   node-red-stop                          to stop Node-RED
Use   node-red-start                         to start Node-RED again
Use   node-red-log                           to view the recent log output
Use   sudo systemctl enable nodered.service  to autostart Node-RED at every boot
Use   sudo systemctl disable nodered.service to disable autostart on boot
 
To find more nodes and example flows - go to http://flows.nodered.org
 
Starting as a systemd service.
19 Mar 22:03:24 - [info]
Welcome to Node-RED
===================
19 Mar 22:03:24 - [info] Node-RED version: v1.0.2
19 Mar 22:03:24 - [info] Node.js  version: v10.17.0
19 Mar 22:03:24 - [info] Linux 4.19.75-v7+ arm LE
19 Mar 22:03:27 - [info] Loading palette nodes
19 Mar 22:03:43 - [info] mDashboard version 0.1.17 started at /mui
19 Mar 22:03:43 - [info] Dashboard version 2.17.1 started at /ui
19 Mar 22:03:44 - [warn] ------------------------------------------------------
19 Mar 22:03:44 - [warn] [node-red-contrib-pixelit/pixelit] TypeError: util.setReflectHandler is not a function (line:2)
19 Mar 22:03:44 - [warn] ------------------------------------------------------
19 Mar 22:03:44 - [info] Settings file  : /home/pi/.node-red/settings.js
19 Mar 22:03:44 - [info] Context store  : 'default' [module=memory]
19 Mar 22:03:44 - [info] User directory : /home/pi/.node-red
19 Mar 22:03:44 - [warn] Projects disabled : editorTheme.projects.enabled=false
19 Mar 22:03:44 - [info] Flows file     : /home/pi/.node-red/flows_localhost.json
19 Mar 22:03:44 - [info] Server now running at http://127.0.0.1:1880/
19 Mar 22:03:45 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
19 Mar 22:03:46 - [info] Starting flows
19 Mar 22:04:00 - [info] Started flows
(node:13669) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 changeStatus listeners added. Use emitter.setMaxListeners() to increase limit
(node:13669) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
19 Mar 22:04:00 - [info] [mqtt-broker:61a8d67e.2b7ef8] Connected to broker: mqtt://localhost:1883
19 Mar 22:05:41 - [red] Uncaught Exception:
19 Mar 22:05:41 - TypeError: Cannot read property 'warn' of undefined
    at /home/pi/.node-red/node_modules/node-red-contrib-mdashboard/nodes/ui_base.js:93:29
    at /usr/lib/node_modules/node-red/node_modules/express/lib/response.js:434:22
    at SendStream.onerror (/usr/lib/node_modules/node-red/node_modules/express/lib/response.js:1044:5)
    at SendStream.emit (events.js:198:13)
    at SendStream.error (/usr/lib/node_modules/node-red/node_modules/send/index.js:270:17)
    at SendStream.onStatError (/usr/lib/node_modules/node-red/node_modules/send/index.js:421:12)
    at onstat (/usr/lib/node_modules/node-red/node_modules/send/index.js:726:26)
    at FSReqWrap.oncomplete (fs.js:153:21)
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Failed with result 'exit-code'.
nodered.service: Service RestartSec=100ms expired, scheduling restart.
nodered.service: Scheduled restart job, restart counter is at 1.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
19 Mar 22:05:46 - [info]
Welcome to Node-RED
===================
19 Mar 22:05:46 - [info] Node-RED version: v1.0.2
19 Mar 22:05:46 - [info] Node.js  version: v10.17.0
19 Mar 22:05:46 - [info] Linux 4.19.75-v7+ arm LE
19 Mar 22:05:48 - [info] Loading palette nodes
19 Mar 22:06:01 - [info] mDashboard version 0.1.17 started at /mui
19 Mar 22:06:02 - [info] Dashboard version 2.17.1 started at /ui
19 Mar 22:06:02 - [warn] ------------------------------------------------------
19 Mar 22:06:02 - [warn] [node-red-contrib-pixelit/pixelit] TypeError: util.setReflectHandler is not a function (line:2)
19 Mar 22:06:02 - [warn] ------------------------------------------------------
19 Mar 22:06:02 - [info] Settings file  : /home/pi/.node-red/settings.js
19 Mar 22:06:02 - [info] Context store  : 'default' [module=memory]
19 Mar 22:06:02 - [info] User directory : /home/pi/.node-red
19 Mar 22:06:02 - [warn] Projects disabled : editorTheme.projects.enabled=false
19 Mar 22:06:02 - [info] Flows file     : /home/pi/.node-red/flows_localhost.json
19 Mar 22:06:02 - [info] Server now running at http://127.0.0.1:1880/
19 Mar 22:06:03 - [warn]
---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.
If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.
You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------
19 Mar 22:06:04 - [info] Starting flows
19 Mar 22:06:19 - [info] Started flows
(node:24185) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 changeStatus listeners added. Use emitter.setMaxListeners() to increase limit
(node:24185) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 finish listeners added. Use emitter.setMaxListeners() to increase limit
19 Mar 22:06:20 - [info] [mqtt-broker:61a8d67e.2b7ef8] Connected to broker: mqtt://localhost:1883

hmmm, I remember that I tried to remove mdashboad because I never used it.... Maybe that causes the problem ?

EDIT: I think I fixed it by removing the mdatshboard:
"npm uninstall node-red-contrib-mdashboard"

You cannot have both mdashboard and node-red-dashboard at the same time, they conflict with each other, as you found out.

1 Like

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