My node-red server was suddenly disconnected and when i restarted the node-red server, my flows are gone. I desperately need some guidance to retrieve whatever I have done on my node-red previously.
I staarted by node-red server with "node-red --safe" and my flows are back. I am going to export my flows and save it somewhere else just in case. But can I know why this has happened?
Before the node-red server got disconnected, I used the sonoff node and deployed the flows. I suspect it is because of that node.
First - stay calm - we will try to help.
We probably need a little more information - which version, operating system etc.
What errors / messages do you see in the console when you start node-red?
Recent changes (including upgrades)?
Try running 'node-red --safe' to see if it is an issue with the flow.json file or node-red itself.
Post snapshots of information (errors, logs etc.) here. There are guidelines on how to post code so that others can read it.
This is what I see when i start node-red. I have configured node-red to start on boot. But because this has happened, I have to start node-red by entering the "node-red start" command. My flows are empty when I run this. However, when I run "node-red --safe" my flows are there.
So it is good to know you have not lost your code etc.
Try starting the flow (Deploy button) now that you can see it...
This is what I see when i stop the flows. I see that there is an error. However I do not know how to solve it.
This is what I see when I click on deploy after running "node-red --safe". It says "deploy failed, no response from server".
Based on the error message shown, your sonoff node is attempting to open a listener on port 443. This is the default port for HTTPS traffic. For safety reasons, your operating system requires applications that want to open listeners below port 1000 to run as root. However, before you conclude that you should run Node-RED as root instead (which is a bad idea for several reasons), can you link the flows library page of the sonoff node that you use? There might be something there
Looks like something is borked with your network.
IP address 0.0.0.0 is not really valid. Port 443 is SSL port - secured connections. Check DNS & make sure you have VPN and other network stack software running properly.
If the server is remote from you then try putting in a support ticket for it if you cannot access it via any other means (generally there is a console or other tool to access servers).
I don't think this is node-red at all at this point but could be wrong...
If you type
node-red start you will start node-red using a flow called
If you type
node-red-start you will start node-red as a systemd service
a missing dash (
-) can makes all the difference in the workd.
Noted on this. Thanks
I have deleted the sonoff node but I cannot deploy the flows so I am having troubles starting the flows
I have successfully deleted that sonoff node and deployed my flows under safe mode. May I know what should I do to get things running normally again?
I found it from your screenshot, https://github.com/saryn/node-red-contrib-sonoff-server
Last updated in 2018, several open issues including that it doesn’t work with newer firmware.
I am able to “see” what is happening here, and where the errors you see are coming from. The sonoff-server node tries to open a listener on port 443 (to @PaulKeates1 above, 0.0.0.0 here means it will listen to connections incoming from outside the machine as well as from localhost), fails because of permissions, and it crashes node-red. This results in the flows editor saying connection lost, as the node-red backend came crashing down there’s nothing behind the editor to connect to now.
To delete all relevant nodes, also check the configuration nodes to see if there’s still remnants behind there. If not, you can safely delete this node from the palette. All development on it appears to have ceased, and it’s unlikely that any issues with it will be fixed. The next question would be what you were trying to do (your goal), and whether others here with more sonoff experience than me (and there’s plenty of those on the forums hete) can help you come up with an alternative solution that isn’t this node.
This is just a follow up question... did the actual flows*.json file disappear at any point? Or was the flows file always there just not being displayed in the editor? I ask this because under 1.0.6 recently I had an odd crash of node-red, because of end endless loop in a given flow, and the weird thing was my current flows file disappeared from my file system (i.e. Pi OS, Linux).
My backup file was present so recovery was easy, copy file to current flow file name, load node red in safe mode, fix the endless loop flow, done. But I was not able to recreate the issue consistently, i.e. active flow file disappearing.
If you always had your current flow file, then different scenario. But if the current flow file was missing, maybe same scenario or close to it, my experience.
Actually my flows weren't missing at all. Like what @zenofmud has said, I should be using "node-red-start" instead of "node-red start" in my terminal
"node-red start" will open a blank flow.
"node-red-start" will open your recently deployed flow. So the only problem I had was a wrong configuration of the Sonoff node that crashed my node-red server. All I had to do was start node-red using "node-red --safe" and remove that Sonoff node and deploy the flow as per normal.
Actually that is a good thing, that you did not have the same scenario I did... suggests that my scenario was just a one-off weird issue, not a trend or potential bug.
What actually happens here is that it creates a new flows file named “start”.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.