Main process exited, code=killed, status=9/KILL

Any suggestions to debug?

8 Nov 19:23:38 - [info] Node-RED version: v0.19.5
28 Nov 19:23:38 - [info] Node.js version: v8.12.0
28 Nov 19:23:38 - [info] Linux 4.14.71-v7+ arm LE
28 Nov 19:23:38 - [info] Loading palette nodes
28 Nov 19:23:48 - [info] Dashboard version 2.11.0 started at /ui
28 Nov 19:23:48 - [info] Settings file : /home/pi/.node-red/settings.js
28 Nov 19:23:48 - [info] HTTP Static : /home/pi/node-red-static
28 Nov 19:23:48 - [info] Context store : 'default' [module=memory]
28 Nov 19:23:48 - [info] User directory : /home/pi/.node-red
28 Nov 19:23:48 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
28 Nov 19:23:48 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
nodered.service: Main process exited, code=killed, status=9/KILL
nodered.service: Unit entered failed state.
nodered.service: Failed with result 'signal'.
nodered.service: Service hold-off time over, scheduling restart.
Stopped Node-RED graphical event wiring tool..

Did it used to work? If so what happened that might have caused it?
First make a copy of the file .flows_raspberrypi.json.backup, it may be useful later. Note there is a leading dot on the name.
Next rename the flows file flows_raspberrypi.json and restart node red then it will start with an empty flow file. See if it is ok then. If it is ok then it is something in the flows file that is causing it. Copy the saved backup file back and rename it flows_raspberrypi.json. The backup file is the previous version of the file so should be it before your last edit. Restart node red again.

been there done that

Done which part and what was the result? We are not telepathic.
[Edit] Also please answer the questions in the first line.

Hello colin
My apologies for my rude answer.

so i have started node red with a clean flow, and tried to install a node

8 Nov 21:04:18 - [info] Node-RED version: v0.19.5
28 Nov 21:04:18 - [info] Node.js version: v8.14.0
28 Nov 21:04:18 - [info] Linux 4.14.79-v7+ arm LE
28 Nov 21:04:19 - [info] Loading palette nodes
28 Nov 21:04:34 - [info] Dashboard version 2.11.0 started at /ui
28 Nov 21:04:34 - [info] Settings file : /home/pi/.node-red/settings.js
28 Nov 21:04:34 - [info] HTTP Static : /home/pi/node-red-static
28 Nov 21:04:34 - [info] Context store : 'default' [module=memory]
28 Nov 21:04:34 - [info] User directory : /home/pi/.node-red
28 Nov 21:04:34 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable
28 Nov 21:04:34 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
28 Nov 21:04:34 - [info] Creating new flow file
28 Nov 21:04:35 - [info] Server now running at http://127.0.0.1:1880/
28 Nov 21:04:35 - [info] Starting flows
28 Nov 21:04:35 - [info] Started flows
28 Nov 21:05:46 - [info] Installing module: node-red-contrib-modbus, version: 4.1.1
28 Nov 21:06:03 - [warn] Installation of module node-red-contrib-modbus failed:
28 Nov 21:06:03 - [warn] ------------------------------------------
28 Nov 21:06:03 - [warn] Killed
28 Nov 21:06:03 - [warn] ------------------------------------------

is there any way to clean all the nodes? and start all over again
?

What does npm -v show
What do you see if you install from the comand line?

cd ~/.node-red
npm install node-red-contrib-modbus

pi@raspberrypi:~ $ npm -v
6.4.1

npm install node-red-contrib-modbus
Killed

sorry wrong DIR

now in .node-red

pi@raspberrypi:~/.node-red $ npm install node-red-contrib-modbus
npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/jsmodbus
npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/source-map-support
npm WARN checkPermissions Missing write access to /home/pi/.node-red/node_modules/vm2
npm WARN node-red-project@0.0.1 No repository field.
npm WARN node-red-project@0.0.1 No license field.

npm ERR! path /home/pi/.node-red/node_modules/jsmodbus
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/home/pi/.node-red/node_modules/jsmodbus'
npm ERR! { Error: EACCES: permission denied, access '/home/pi/.node-red/node_modules/jsmodbus'
npm ERR! stack: 'Error: EACCES: permission denied, access '/home/pi/.node-red/node_modules/jsmodbus'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/home/pi/.node-red/node_modules/jsmodbus' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2018-11-28T21_13_01_771Z-debug.log

Hmm, odd. You could try renaming the .node-red directory. Then restart node-red. That should recreate the directory with no local nodes installed. Then try the install from the command line again.
You still haven't told us what happened that might have triggered this.
Is the pi otherwise behaving normally?

i have been using node-red for one year now, and haven't done nothing differently.
I just started to have this memory Leaks.

I have daily saved the flows and the flows_raspberrypi_cred.json.

Should I clean all the raspebrry SD and start with a clean sheet?

Just seen your post in the right directory. It seems you have not got access to some folders. Possibly you have been running node-red or npm with sudo, which can cause that. To fix it

cd ~/.node-red
sudo chown -R pi:pi .

That should change the ownership of everything in .node red back to being owned by pi.

colin

Thank you stil the same

how may clean all and install again?

JLG

So after running chown you still see the access permissions error?

But if you don't want to investigate further then as I suggested you can rename the .node-red directory and restart node-red and it will create a new directory with no local nodes installed.

done that stiil the same

===================
28 Nov 21:39:09 - [info] Node-RED version: v0.19.5
28 Nov 21:39:09 - [info] Node.js version: v8.14.0
28 Nov 21:39:09 - [info] Linux 4.14.79-v7+ arm LE
28 Nov 21:39:10 - [info] Loading palette nodes
28 Nov 21:39:16 - [info] Settings file : /home/pi/.node-red/settings.js
28 Nov 21:39:16 - [info] Context store : 'default' [module=memory]
28 Nov 21:39:16 - [info] User directory : /home/pi/.node-red
28 Nov 21:39:16 - [warn] Projects disabled : editorTheme.projects.enabled=false
28 Nov 21:39:16 - [info] Flows file : /home/pi/.node-red/flows_raspberrypi.json
28 Nov 21:39:16 - [info] Creating new flow file
28 Nov 21:39:16 - [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.

28 Nov 21:39:16 - [info] Starting flows
28 Nov 21:39:16 - [info] Started flows
28 Nov 21:39:16 - [info] Server now running at http://127.0.0.1:1880/
28 Nov 21:40:05 - [info] Installing module: node-red-contrib-modbus, version: 4.1.1
28 Nov 21:40:26 - [warn] Installation of module node-red-contrib-modbus failed:
28 Nov 21:40:26 - [warn] ------------------------------------------
28 Nov 21:40:26 - [warn] Killed
28 Nov 21:40:26 - [warn] ------------------------------------------

the raspberry pi is a rabit hole

Please try and make it clear what you have done. Do you mean you renamed the .node-red directory?
Are you telling it to install the node or is it doing that by itself?

renamed the directory.
started node red with a new flow , and tested by trying to install that node again

As per the readme for the node did you try a manual install with --unsafe-perm ?