admin管理员组文章数量:1134247
The only answer on this question I saw - go start another copy on the different port. Switching from one Meteor workspace to another Okay, I see that I can run another one on the different port, BUT how to stop the first one?
The only answer on this question I saw - go start another copy on the different port. Switching from one Meteor workspace to another Okay, I see that I can run another one on the different port, BUT how to stop the first one?
Share Improve this question edited May 23, 2017 at 11:55 CommunityBot 11 silver badge asked Sep 2, 2012 at 17:54 drzhbedrzhbe 7911 gold badge6 silver badges16 bronze badges 2 |14 Answers
Reset to default 97I use this command:
kill -9 `ps ax | grep node | grep meteor | awk '{print $1}'`
Or, I run this if I'm on my local machine to kill remote processes:
ssh [user]@[server] <<'ENDSSH'
kill -9 `ps ax | grep node | grep meteor | awk '{print $1}'`
exit
ENDSSH
On OSX, go back to the term you opened to start meteor, and use CTRL+C to quit the process.
if Meteor is running on :3000 port:
kill -9 $(lsof -i :3000 -t);
Similar to Fernando's response, if you're on OSX you can quit the processes node
and mongod
using Activity Monitor.
quitting node
will stop the server. The database will still be running and accepting incoming connections, so quitting mongod
will turn off the database.
Enter command "Ctrl + C" on the terminal where the meteor process is running. This is the easiest way to kill the process in both Mac and Ubuntu. Not sure of Windows though.
Happy Coding!
In my case (Ubuntu 11.10) I open the System Monitor and kill manually the node
and mongod
processes.
Of course you can use also the terminal and kill these processes knowing their PID's.
An edit to John Devor's (accepted) answer: if you're editing your code with Atom, his command may kill the editor instances:
$ ps ax | grep node | grep meteor
19312 pts/2 Sl+ 0:16 /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/tools/main.js
19541 pts/2 Sl+ 0:02 /home/teo/.meteor/packages/meteor-tool/.1.1.4.e4elpj++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/bin/node /home/teo/meteor/beari/dist/.meteor/local/build/main.js
24438 ? Sl 0:00 /usr/share/atom/atom --no-deprecation /home/teo/.atom/packages/linter-jshint/node_modules/jshint/bin/jshint --reporter /home/teo/.atom/packages/linter-jshint/node_modules/jshint-json/json.js --filename /home/teo/meteor/beari/beari.js -
Better to use a command like:
kill -9 `ps ax | grep node | grep meteor | grep -v atom | awk '{print $1}'`
When you are looking at the terminal with the unwanted meteor running just press Ctrl+C to turn off meteor.
To run more applications side by side run on a different port with the --port
option
use sudo killall -9 node
command. it will kill all the rprocess.
Actually, kill -9
kills meteor immediately, which is not a good idea. It's an emergency feature and should be applied only when regular kill
(no signal specified) fails, as it prevents processes from running shutdown procedures.
the default port is 3000.If you want to run it in a different port use below meteor run --port 3030
run this in two command prompt.If you want to stop use ctrl+c in necessary command prompt
Enter command "Ctrl + C" on the terminal where you want to stop process is running. This is the easiest way to kill the process in both Mac and Ubuntu and Windows.And you can use "meteor run --port portnumber" to run the two or more projects at the same time
In the terminal, I used: $ sudo killall -9 node
(this kills all running node jobs)
It's so simple in my case, I always have two terminal tabs open, one for launching Meteor/stopping it and the other terminal for working the commands. So to stop it I just do the universal control+c
to stop the working process.
本文标签: javascriptHow to stop MeteorStack Overflow
版权声明:本文标题:javascript - How to stop Meteor? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736856571a1955736.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
Holy
(sorry, couldn't resist.) – Frédéric Hamidi Commented Sep 2, 2012 at 17:55