foreversd / forever

A simple CLI tool for ensuring that a given script runs continuously (i.e. forever)
http://github.com/foreverjs/forever
MIT License
13.88k stars 944 forks source link

Can't stop running script #805

Open mbabauer opened 8 years ago

mbabauer commented 8 years ago

I have forever installed on a test box, but I am moving to Docker. I need to stop the node process I have running, but no matter what I do it just keeps restarting.

I did a forever list and I get the list of stuff running. I do a ps -ef and I can see the process. I then issue a forever stopall, and it reports that it's stopping the process, but when I forever list and ps -ef again I see it running, but with a new pid. I also tried to stop it using forever stop 0, but same thing. If I kill the process, same thing. I even did ps -ef | grep forever, saw forever was running as root, and killed that, but even that process restarted itself.

How do I stop forever? It is truly living up to its name here. My only other thought here is to F&R (format and reseed) the test server (the nuclear option).

zparduhn commented 8 years ago

I have the same issue. Can't figure out how to stop forever from being immortal.

mbabauer commented 8 years ago

I never found a solution. I wound up just nuking the cloud instance and starting over.

betaWeb commented 7 years ago

Hi there,

I've the same issue ! Even when I kill forever process, he restarts for himself !

liywjl commented 7 years ago

I have a similar issue, however it was caused by running a forever COMMAND ex : forever -c "npm run build"

pipinov commented 7 years ago

I have a similar issue, can't stop process which was running as forever start -c "yarn start" ./

osamamohsen commented 7 years ago

Test That , solve for me forever stopall node name_js_file.js Ctril + C // now the server didnt listen to my port any more

cristicmf commented 7 years ago

when I start a server forever start index.js , and I just do a check, forever list, It's nothing. But when I use the sudo forever start index.js , Everything seem like is ok.

alkhachatryan commented 5 years ago

I'm using socket io server using forever and have the same issue. The single thing which is working for me. For first stopall or stop ID and kill the port

forever stopall (OR WITH FOREVER ID) fuser -k 8080/tcp (UBUNTU)

alkhachatryan commented 5 years ago

If you want to kill the process ran with forever start -c 'some command'

Run the PS AUX (Ubuntu check all processes) and find your command alexey 20230 10.0 0.3 800708 42100 ? Sl 13:08 0:00 node resources/assets/js/socket/socket-io-server.js /var/www/html/project/

And don't forget to kill the FOREVER process alexey 20211 8.0 0.3 570448 44552 ? Ssl 13:08 0:00 /usr/local/bin/node /usr/local/lib/node_modules/forever/bin/monitor ./

If you ran a command like this: forever start -c 'npm run socker' You must to stop 2 processes: FOREVER and NPM (in my example)