Node-Red does not start anymore

I am using the latest openhabian image. I was installing a couple node-red modules and then node-red stopped working. Now I am not able to start node-red anymore. Is there a way to do a clean deinstallation of all parts related to node-red or does anyonre know how to fix this? Node-red-start goes into an infinite loop…

Starting as a systemd service.
09 May 16:23:49 - [info] RedBot version: 0.12.2 (node-red-contrib-chatbot)
9 May 16:23:59 - [info] Dashboard version 2.9.1 started at /ui
9 May 16:24:01 - [red] Uncaught Exception:
9 May 16:24:01 - Error: bind EADDRINUSE
    at Object._errnoException (util.js:1022:11)
    at _exceptionWithHostPort (util.js:1044:20)
    at _handle.lookup (dgram.js:266:18)
    at _combinedTickCallback (internal/process/next_tick.js:141:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
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.
9 May 16:24:03 - [info]
Welcome to Node-RED
9 May 16:24:03 - [info] Node-RED version: v0.18.4
9 May 16:24:03 - [info] Node.js  version: v8.11.1
9 May 16:24:03 - [info] Linux 4.14.34-v7+ arm LE
9 May 16:24:04 - [info] Loading palette nodes

try that:

Maybe you will need sudo

I always recommend stopping node-red and installing nodes on the command line rather that doing it “live” on the node-red interface. Doesn’t always work.

Use this:

thanks but i tried all of it and it does not work. Any other suggestion?
Thanks Jens

Hmm, I it is a bit strange now. I did remove node-red, node.js completly and then installed with this docu:

Only issue, I was not able to get node-red running at startup. Starting with node-red worked just fine.

Then I used the node-red install tool in the openhabian-config again and tried to start via node-red-start and it failed.

I think you should do an openhab backup
And do a fresh openhabian install
Don’t forget to back-up your node-red flows

Thats what I am still trying to avoid. I’ll give it some more hours. I might move node-red then to a pi zero.

@JensFr I too found out that Node-RED was not correctly set to auto load at boot after installing it.

In order to have Node-RED to run automatically at boot, the following command must be run from the CLI:

sudo systemctl enable nodered

Hope this helps.

Bye, Luca