Cannot Kill process

October 11, 2018 206 views
Node.js Ubuntu 18.04

I've tried all sorts of kill commands. When I go sudo netstat -lpn | grep :3000 I get a PID for a process. I kill it an another one immediately appears. I've tried every command I found on stack overflow and nothing can kill it.

Is there a way to wipe my droplet? I just started it so this would be easier then spending any more time trying to debug this.

This all stems from the inability to run my node app, but I believe this will be the first step to solving the larger issue.

1 comment
  • Click on destroy in the control panel and there will be an option to rebuild. Select your desired image and hit rebuild.

3 Answers
deltar7 October 11, 2018
Accepted Answer

I found this that finally killed it killall -s KILL node . Maybe specific to this case, I don't know. No other kill commands worked. Thanks for the reponses~

Perhaps search for node:

grep node -r /etc/systemd/system

And pm

grep pm -r /etc/systemd/system


It's likely your nodejs is running as a service in /etc/systemd/system and so systemd restarts it the second you kill it (it's made to restart automatically). So check /etc/systemd/system for nodejs services:

systemctl |grep node

grep "3000" -r /etc/systemd/system/

If it's there you can stop it or disable it:

systemctl stop <service>
systemctl disable <service>
  • I have a feeling you are correct but nothing shows up grepping in that directory. I feel like if I rebuild my droplet with the same image this will just start again so I have not done that.

Have another answer? Share your knowledge.