Node-Red will not connect to URL on Raspberry Pi

After configuring a flow and deploying it, I cannot access the URL provided in the Node-RED console terminal anymore. I am attempting to display thermocouple temperatures with an Adafruit MAX31855 K-type thermocouple breakout board. One of the error messages that shows up is that there is no module named Adafruit_GPIO.SPI. When opening up Node-RED on the Raspberry Pi, the error messages loop. Here is what I see when opening Node-Red:


Start Node-RED
 
Once Node-RED has started, point a browser at ____________
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
 
Starting as a systemd service.
Started Node-RED graphical event wiring tool.
29 Mar 15:05:25 - [info]
Welcome to Node-RED
===================
29 Mar 15:05:25 - [info] Node-RED version: v0.20.3
29 Mar 15:05:25 - [info] Node.js  version: v10.15.3
29 Mar 15:05:25 - [info] Linux 4.14.79-v7+ arm LE
29 Mar 15:05:26 - [info] Loading palette nodes
29 Mar 15:05:30 - [info] Dashboard version 2.14.0 started at /ui
29 Mar 15:05:30 - [info] Settings file  : /home/pi/.node-red/settings.js
29 Mar 15:05:30 - [info] Context store  : 'default' [module=memory]
29 Mar 15:05:30 - [info] User directory : /home/pi/.node-red
29 Mar 15:05:30 - [warn] Projects disabled : editorTheme.projects.enabled=false
29 Mar 15:05:30 - [info] Flows file     : /home/pi/.node-red/flows_raspberrypi.json
29 Mar 15:05:30 - [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.
---------------------------------------------------------------------
29 Mar 15:05:30 - [info] Starting flows
Adafruit MAX 31855: Checking for muxing... 0
29 Mar 15:05:30 - [info] Started flows
29 Mar 15:05:30 - [info] Server now running at ____________________
29 Mar 15:05:30 - [red] Uncaught Exception:
29 Mar 15:05:30 - Error: ImportError: No module named Adafruit_GPIO.SPI
    at PythonShell.parseError (/home/pi/.node-red/node_modules/python-shell/index.js:183:17)
    at terminateIfNeeded (/home/pi/.node-red/node_modules/python-shell/index.js:98:28)
    at ChildProcess.<anonymous> (/home/pi/.node-red/node_modules/python-shell/index.js:88:9)
    at ChildProcess.emit (events.js:189:13)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
    ----- Python Traceback -----
nodered.service: Main process exited, code=exited, status=1/FAILURE
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'exit-code'.
nodered.service: Service hold-off time over, scheduling restart.
Stopped Node-RED graphical event wiring tool.
Started Node-RED graphical event wiring tool.
29 Mar 15:05:33 - [info]
---------------------------------------------------------------------------------

This message continuously repeats in an ongoing loop. When attempting to follow the URLs presented in the above message from Node-RED, the following message is given in the brower: 

This site can’t be reached
10.0.0.41 refused to connect.
Try:

Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED

So far, I think that it could be an issue with the MAX31855 module, the connection to the server, or the error message that is about flow credentials.

Thank you for your help.

Hi,

the error is with whatever node you've installed to try to access the device. Which node are you using?

It is a fatal uncaught error that is crashing Node-RED. Nodes should not do that - so you should raise an issue against the node.

As you are on version 0.20.3, you can take advantage of the new safe mode to start node-red without your flows running.

Open a new terminal and run node-red-stop. Then run node-red --safe - that will start Node-RED in safe mode. You should then be able to access it in your browser, edit/remove the offending node and deploy - at which point it'll exit safe mode and start your flows. If it still crashes, restart in safe mode and try again.

Once you've got it stable, stop node-red (ctrl-c in the window you can node-red --safe in), then restart it as a service with node-red-start.

Thank you so much for your reply, deleting the faulty node worked. The node is called "adafruit max31855". One thing that I believe could be an issue is that I may need to use the default SPI pins rather than bit-banging GPIO pins. Whenever I enter bit-bang GPIO pins into the node, they are erased the next time I open the node.

The Node doesn't seem to check that the required adafruit python libraries are installed (and that spi is enabled). Their readme should at least mention those pre-reqs. Please raise an issue against that node to at least improve the docs.