This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
Closed
Description
I run node server.js in the terminal, then terminal hung, I had to quit terminal.
When I opened the terminal back. I tried to load server.js again, it says add already in use. And the app is still running.
Now I had made some change with server.js, I want to stop the current server, and reload it so the new changes will apply.
How can I terminate the current server.js ?
Metadata
Assignees
Labels
No labels
Activity
murvinlai commentedon Jun 20, 2011
you have to check Linux process.
% ps -A
then, let say the node process id is 12345
then just do that:
% kill 12345 or kill -9 12345
The reason u can't start the server again because it is using the same port.
bradwright commentedon Jun 20, 2011
An easier way to find this:
should show you all processes matching node. To kill without knowing the
PID
(will also kill any other processes matchingnode
):dresende commentedon Jun 20, 2011
You could listen for SIGUSR1 or SIGUSR2 signals and terminate the process correctly.
You can send the signal with:
bnoordhuis commentedon Jul 5, 2011
Not a bug but seems to have been resolved anyway. :)
nakamuraagatha commentedon Jul 13, 2016
How to start again node after pkill node?
i use this command on ssh
and i don't know about start again that node
eljefedelrodeodeljefe commentedon Jan 24, 2017
@fatimazbouj this is a PHP questions. Please refer to the PHP docs. Probably something like http://php.net/manual/de/function.proc-get-status.php
bnoordhuis commentedon Jan 24, 2017
This bug tracker is not the right place for support questions, try https://github.com/nodejs/help/issues.