无法找到node.js应用程序在哪里运行,也无法杀死它 [英] Can't find out where does a node.js app running and can't kill it

查看:157
本文介绍了无法找到node.js应用程序在哪里运行,也无法杀死它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做什么: 我刚刚设置了节点环境,安装了Express,创建并安装了Express项目

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

express hello
cd hello && npm install

然后使用"node app"启动应用.

then started the app with "node app".

环境:

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

问题 当我想停止该应用程序时,我使用了CTRL+C,,但发现的是它没有停止.然后,我重新启动了服务器!我发现我仍然可以在浏览器中访问该页面.奥尔兹.

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.

===== 更新 奇怪的是,我的机器上的所有浏览器都可以访问该站点,而其他机器上不可用!我仅在停止应用程序之前使用Chrome访问该页面.这似乎是一个缓存问题,但是缓存如何在浏览器之间共享.

===== 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..

推荐答案

列表节点进程:

$ ps -e|grep node

使用以下命令杀死进程

$kill -9 XXXX

此处XXXX是进程号

这篇关于无法找到node.js应用程序在哪里运行,也无法杀死它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆