Help. I killed Node-Red on my Raspberry Pi.

803 views
Skip to first unread message

Stephen Mann

unread,
Nov 22, 2017, 11:53:35 PM11/22/17
to Node-RED
I tried doing an npm update in an effort to get weatherunderground nodes to install, but after running npm update, my node-red is dead.  When I go to 192.168.1.124:1880, I get "This site can't be reached".

Can this be salvaged or do I need to start over and re-install node-red?
And, is there any way to save all of my dashboard nodes?

Near panic here because this loses weeks of work.

Mark Setrem

unread,
Nov 23, 2017, 2:30:19 AM11/23/17
to Node-RED
What does the log say when you start node-red?

The flows file is saved in your ~/.node-red directory and won't have been impacted.

Colin Law

unread,
Nov 23, 2017, 3:52:18 AM11/23/17
to node...@googlegroups.com
On 23 November 2017 at 07:30, Mark Setrem <mse...@gmail.com> wrote:
> What does the log say when you start node-red?
>
> The flows file is saved in your ~/.node-red directory and won't have been impacted.

Please, before doing anything else make a backup of your SD card, or
at least the ~/.node-red folder and any other important data on the
card. SD cards are much more easily corrupted by, for example, power
failure, than a hard disc is, or may suffer from sudden death for no
obvious reason. It is not a good idea to do weeks of work without a
backup.

Colin

Steampunk Prof

unread,
Nov 23, 2017, 3:55:56 AM11/23/17
to Node-RED
It's happened to me more than a few times. As Mark says, check the logs. You can also try running it from the command line with the -v option which I've always found really useful for picking up faulty nodes that can stop Node-RED from running.

Stephen Mann

unread,
Nov 24, 2017, 9:01:50 PM11/24/17
to Node-RED
Thanks- I found that and moved it to another RPi to keep working.

Stephen Mann

unread,
Nov 24, 2017, 9:03:13 PM11/24/17
to Node-RED
Everything else is working just fine on this Pi, and I don't want to have to reinstall them on a new SD card- especially the RAID.  I just copied my flows to another Pi and I am back to work now.

Stephen Mann

unread,
Nov 24, 2017, 9:04:22 PM11/24/17
to Node-RED
It's not a faulty node- it's missing nodes on the palette, like mqtt-in and mqtt-out  that were there before.

Colin Law

unread,
Nov 25, 2017, 4:11:37 AM11/25/17
to node...@googlegroups.com
Whether it is a faulty node or something else, the first thing to do
is always to look at the log.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/62fd4421-14d2-4059-bfca-1e33e684afc6%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.

Stephen Mann

unread,
Nov 26, 2017, 10:15:02 AM11/26/17
to Node-RED
Thanks for your reply Colin, but...
Like I said- I killed it.

Welcome to Node-RED
===================
24 Nov 22:04:09 - [info] Node-RED version: v0.17.5
24 Nov 22:04:09 - [info] Node.js  version: v6.12.0
24 Nov 22:04:09 - [info] Linux 4.9.35-v7+ arm LE
24 Nov 22:04:11 - [info] Loading palette nodes
24 Nov 22:04:22 - [info] Settings file  : /home/pi/.node-red/settings.js
24 Nov 22:04:22 - [info] User directory : /home/pi/.node-red
24 Nov 22:04:22 - [info] Flows file     : /home/pi/.node-red/flows_Marvin.json
24 Nov 22:04:22 - [info] Server now running at http://127.0.0.1:1880/
24 Nov 22:04:23 - [info] Waiting for missing types to be registered:
24 Nov 22:04:23 - [info]  - ui_tab
24 Nov 22:04:23 - [info]  - ui_group
24 Nov 22:04:23 - [info]  - ui_switch
24 Nov 22:04:23 - [info]  - ui_button
24 Nov 22:04:23 - [info]  - ui_text
24 Nov 22:04:23 - [info]  - ui_chart
Stopping Node-RED graphical event wiring tool....
24 Nov 22:08:26 - [info] Stopping flows
Stopped Node-RED graphical event wiring tool..

Those missing nodes appear to be integral to Node-Red and there is no way to install them through npm.

As I said, I was able to save my node files and move them to another Pi, but it's an inconvenient solution.  Ideally, I would like to be able to completely reinstall Node-Red on the original host Pi (Marvin), but it isn't a high priority.

Nick O'Leary

unread,
Nov 26, 2017, 10:21:50 AM11/26/17
to node...@googlegroups.com

Those node types are all provided by the node-red-dashboard module that can be installed via npm.

Nick


Dave C-J

unread,
Nov 26, 2017, 1:09:04 PM11/26/17
to Node-RED
The easiest way to re-install on a Pi is to use the install script as per the install docs (running as Pi user)

To install the dashboard to get those nodes
    cd ~/.node-red  && npm i node-red-dashboard
Then stop and re-start node-red
    node-red-stop && node-red-start


Stephen Mann

unread,
Nov 26, 2017, 1:50:31 PM11/26/17
to Node-RED
You mean: 'sudo npm i node-red-dashboard' ?

Done that before, but I'll try again.

Got two warnings:
npm WARN node-red...@0.0.1 No repository field.
npm WARN node-red...@0.0.1 No license field.

Did a node-red-stop then node-red-start

Then - this time, it seems to have fixed my node-red.  Everything is working now.

I am pretty sure that I did install dashboard before, or maybe I thought I installed dashboard.

I have node-red running in too many places, but thanks to your input, I am now back to the RPi that I wanted to run node-red on.

Stephen Mann

unread,
Nov 26, 2017, 1:52:47 PM11/26/17
to Node-RED
Thanks, I did do that, but the palette was missing a lot of nodes.  Colin's tip about reinstalling the dashboard fixed that.

Everything seems to be working now, including weather Underground, which is where I was when the problems started.

Steve

Dave C-J

unread,
Nov 26, 2017, 1:59:23 PM11/26/17
to node...@googlegroups.com
No.  Don't use sudo
--
Sent from phone.

Julian Knight

unread,
Nov 27, 2017, 4:22:11 AM11/27/17
to Node-RED
Indeed, this needs to be written on everyone's hearts!

Only use sudo when you absolutely have to. On a standard install of Node-RED on any platform, no nodes should need to be installed with sudo. There are a few that interface with hardware and you might find permission errors - but you should fix those by dealing with the underlying problem - which is that the user running Node-RED doesn't have permission to the hardware, there is usually a group you can add the user to to resolve that.

Colin Law

unread,
Nov 27, 2017, 4:27:51 AM11/27/17
to node...@googlegroups.com
Also do remember to
cd ~/.node-red
assuming you are using the default configuration, before doing npm install.

Colin
> --
> http://nodered.org
>
> Join us on Slack to continue the conversation: http://nodered.org/slack
> ---
> You received this message because you are subscribed to the Google Groups
> "Node-RED" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to node-red+u...@googlegroups.com.
> To post to this group, send email to node...@googlegroups.com.
> Visit this group at https://groups.google.com/group/node-red.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/node-red/cbff5bb0-6f11-455a-8442-66a0714a41e9%40googlegroups.com.

Stephen Mann

unread,
Nov 30, 2017, 12:55:20 AM11/30/17
to Node-RED
Ooooo-K.
So, when a non-sudo npm gives me a permissions error, I should change the owner or permissions of the file that is generating the error?

Colin Law

unread,
Nov 30, 2017, 2:06:47 AM11/30/17
to node...@googlegroups.com
Which file is it? If it is under your home folder then yes. Generally all files under your home should be owned by you unless you have special requirements. The usual way of getting into this situation is by using sudo when it is not appropriate

Colin

Colin

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Stephen Mann

unread,
Nov 30, 2017, 10:48:38 PM11/30/17
to Node-RED
That is starting to make sense.  Everything in ~/.node-red except npn-debug.log are owned by pi.  The log file is owned by root.
It never occurred to me that using sudo when not needed may create permission errors.  Now I get it.

Thanks,
Steve



On Thursday, November 30, 2017 at 2:06:47 AM UTC-5, Colin Law wrote:
Which file is it? If it is under your home folder then yes. Generally all files under your home should be owned by you unless you have special requirements. The usual way of getting into this situation is by using sudo when it is not appropriate

Colin

Colin
On 30 Nov 2017 5:55 a.m., "Stephen Mann" <mann....@gmail.com> wrote:
Ooooo-K.
So, when a non-sudo npm gives me a permissions error, I should change the owner or permissions of the file that is generating the error?


On Monday, November 27, 2017 at 4:22:11 AM UTC-5, Julian Knight wrote:
Indeed, this needs to be written on everyone's hearts!

Only use sudo when you absolutely have to. On a standard install of Node-RED on any platform, no nodes should need to be installed with sudo. There are a few that interface with hardware and you might find permission errors - but you should fix those by dealing with the underlying problem - which is that the user running Node-RED doesn't have permission to the hardware, there is usually a group you can add the user to to resolve that.

On Sunday, 26 November 2017 18:59:23 UTC, Dave C-J wrote:
No.  Don't use sudo
--
Sent from phone.

--
http://nodered.org
 
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.

To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.

Julian Knight

unread,
Dec 1, 2017, 6:00:36 PM12/1/17
to Node-RED
Another convert! 
Reply all
Reply to author
Forward
0 new messages