Node-Red instance suddenly not starting on boot

I have a device that I am working on remotely, and do not have physical access to. I do have ability to interact with it via ip address. All has been working fine for the past several weeks, but today after a reboot, I am unable to pull up the interface, and it says it refuses to connect. I can still access via ssh, however. When I run the node-red-log, I get the following:

A clarification, it appears node red is running, but I am unable to connect to port 1880. Any advice on how to handle this?

From your description, it seems that this ‘device’ (it would be helpful to know what type of device, what OS, version of NR and node.js) is accessible over the internet. Is that true?

If so, what type of security do you have setup?

The device is a raspberry pi 4, 4GB running 32 bit raspbian. No security set up, and not accessible over the internet. It is running zerotier, which provides an IP address that I can use to interact with it as if it is on a local network. I can still connect with it over ssh using the zero tier ip. Someone who is in physical proximity and is connected to it on a local network is having the same problem.

Can you run these commands in a terminal?
systemctl status nodered
sudo systemctl stop nodered
node-red (you may eventually need CTRL C to stop it)
Take a screenshot of the browser when you try and access ipaddress:1880

Show us the results. It probably won't reveal anything beyond what you already shared but worth a try.

OK but I wanted to see the output of nodered too (starts Node-red from the command line)

Incidentally, the IP address which Zerotier gives is a "local" address. Nobody can connect to your Node-red with it unless they are members of your Zerotier network and you authorised them. So no real need to hide the address.

Thanks, wasn't sure about that. I ran the command and there was no output.

My mistake, it's node-red

the second screenshot shows that, just got the failed to get https settings error

here is running it again, and running node-red-start

You are right, sorry!

So nothing new. I don't know about Node-red and https. I'm sure other people here do.

not sure that it helps, but I actually never configured it to use https

What was the last thing you changed before it failed? Did you edit settings.js? If so then you have probably messed it up.

Otherwise, as an experiment, rename your .node-red folder, then stop and start node-red again and see what happens. If the problem is something in that folder then node red will start with empty flows. To get back to where you were you just have to put the original folder back.

You have got you flows file backed up haven't you?

It seems to be complaining about the httpStatic or httpStaticRoot sections (?) from settings.js

You could remove this file (keep a copy!) and then start Node-red, it should create a new default one.

Yes, that was going to be my suggestion if replacing the whole folder works. Of course if @aams had been editing the file then maybe he just needs to post the section of the file where he edited. Most likely there is a missing comma or something like that.

Ok, that worked. Here is what I have changes in the httpStatic section:

What fixed it? renaming the whole folder or just settings.js? If it was the whole folder then try with just settings.js renamed. If that does fix it then try just commenting out those four lines.
If that doesn't fix it then copy/paste the full settings file here. Use the </> button at the top of the forum entry window when pasting it in.

Hi,

You can also restart node-red without a project loaded by doing:

node-red --safe

Cheers,

Paul

That won't help if settings.js is not valid.