I have been using NodeRED on the RPi for a couple of days, but then it started saying I had "credential errors" to IBM BlueMix (which works fine), and now NodeRED won't startup on the RPi at all. Network connections are up, everything else seems fine, but attempting to start NodeRED results in a loop of startup messages, followed by "session opened for root user (uid=0)" and then immediately "session closed for root user". Any attempt to reload the web page to localhost:1880 show either just a word or two of "NodeRED", or nothing at all / "Unable to connect".

I've tried rebooting, shutting down and letting the RPi cool off for 30 minutes, etc. No luck. Thoughts, anyone?


I found it.

NodeRED was making two .json files in the the ~/.node-red/ directory. These scripts including authentication to a remote site, but those were works in progress and incorrect. As a result, the authentication failed. Instead of a graceful failure (some kind of message, and an offer to ignore those files, for example), NodeRED simply began spinning on starting and then stopping.

To fix this kind of issue:

  • Run node-red-stop
  • Change to the ~/.node-red/ directory
  • Use mv to rename the two .json files to end in .SAVE instead (i.e., save the contents if you'd like. But, you could just rm the files)
  • Run node-red-start

You may lose your last working session (you can review the .SAVE files), but at least you'll be back on the air.

By the way, reinstalling NodeRED would not have cured this - the .node-red directory would have remained, the two .json files would still be there, and the startup would crash again.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.