Question

Cannot Kill process

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.

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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
alexdo
Site Moderator
Site Moderator badge
April 16, 2024

Heya,

Sometimes, there might be parent processes spawning the one you’re trying to kill. Use tools like ps or pstree to identify related processes and kill them as well.

ps axu | grep $command

If all else fails, you can try killing the process with signal 9 (SIGKILL), which is more forceful than the default signal sent by kill, so it will be kill -9 $command

Regards

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel