Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find out where does a node.js app running and can't kill it

Tags:

linux

node.js

What I did: I have just set up node environment, installed express, create and installed an express project

express hello cd hello && npm install 

then started the app with "node app".

Environment:

yole@Yole:~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description:    Debian GNU/Linux 7.2 (wheezy) Release:    7.2 Codename:   wheezy  yole@Yole:~$ node --version v0.10.22  yole@Yole:~$ express --version 3.4.4 

Problem When I want to stop this app, I used CTRL+C, but the thing I found is it did not stopped. Then I restarted the server! I found I can still access the page in browser. Orz.

I have tried the following thing but still can't find out the running process.

yole@Yole:~$ killall node node: no process found  yole@Yole:~$ ps -ef|grep node yole      3161  2888  0 16:57 pts/1    00:00:00 grep node  yole@Yole:~$ netstat -apn|grep 3000 

Question How to find out the running node process or how to kill it.

===== update It is very strange that all browses in my machine can visit the site while it's not available on other machine! I only visit the page with Chrome before I stop the application. It seems to be a cache problem, but how cache shared among browsers..

like image 794
yuyue007 Avatar asked Nov 20 '13 09:11

yuyue007


People also ask

How do I kill NodeJS app?

type Ctrl + C to properly kill it.


1 Answers

List node process:

$ ps -e|grep node 

Kill the process using

$kill -9 XXXX 

Here XXXX is the process number

like image 197
Damodaran Avatar answered Oct 03 '22 03:10

Damodaran